More specific caching keys
This commit is contained in:
@@ -54,7 +54,7 @@ class Newznab(NZBProvider, RSS):
|
||||
})
|
||||
url = "%s&%s" % (self.getUrl(self.urls['search']), arguments)
|
||||
|
||||
cache_key = '%s-%s' % (movie['library']['identifier'], cat_id[0])
|
||||
cache_key = 'newznab.%s.%s' % (movie['library']['identifier'], cat_id[0])
|
||||
single_cat = (len(cat_id) == 1 and cat_id[0] != self.cat_backup_id)
|
||||
|
||||
try:
|
||||
|
||||
@@ -53,7 +53,7 @@ class NZBMatrix(NZBProvider, RSS):
|
||||
url = "%s?%s" % (self.urls['search'], arguments)
|
||||
log.info('Searching: %s' % url)
|
||||
|
||||
cache_key = '%s-%s' % (movie['library'].get('identifier'), cat_ids)
|
||||
cache_key = 'nzbmatrix.%s.%s' % (movie['library'].get('identifier'), cat_ids)
|
||||
single_cat = True
|
||||
|
||||
try:
|
||||
|
||||
@@ -50,7 +50,7 @@ class Nzbs(NZBProvider, RSS):
|
||||
})
|
||||
url = "%s?%s" % (self.urls['api'], arguments)
|
||||
|
||||
cache_key = '%s-%s' % (movie['library'].get('identifier'), str(cat_id))
|
||||
cache_key = 'nzbs.%s.%s' % (movie['library'].get('identifier'), str(cat_id))
|
||||
|
||||
try:
|
||||
data = self.getCache(cache_key)
|
||||
@@ -72,8 +72,9 @@ class Nzbs(NZBProvider, RSS):
|
||||
|
||||
for nzb in nzbs:
|
||||
|
||||
id = int(self.getTextElement(nzb, "link").partition('nzbid=')[2])
|
||||
new = {
|
||||
'id': int(self.getTextElement(nzb, "link").partition('nzbid=')[2]),
|
||||
'id': id,
|
||||
'type': 'nzb',
|
||||
'name': self.getTextElement(nzb, "title"),
|
||||
'age': self.calculateAge(int(time.mktime(parse(self.getTextElement(nzb, "pubDate")).timetuple()))),
|
||||
|
||||
Reference in New Issue
Block a user