Add API caching, move calls out into its own modules for reuse.

This commit is contained in:
2013-11-11 20:50:16 +00:00
parent ccf41cc2ce
commit 79d12ee1c0
6 changed files with 88 additions and 24 deletions

14
evesde/models/cache.py Normal file
View File

@@ -0,0 +1,14 @@
from django.db import models
class EVEAPICache(models.Model):
key = models.CharField('Cache Key', blank=False, max_length=40)
cache_until = models.DateTimeField('Cached Until', blank=False)
document = models.TextField('Document')
class Meta:
app_label = 'evesde'
def __unicode__(self):
return '%(key)s - %(cache_until)s' % self.__dict__