Simplify cache_key
This commit is contained in:
1 parent
19640a9192
commit
747594d626
1 file changed
+2
-1
@@ -1,6 +1,6 @@
|
|||||||
from couchpotato import addView
|
from couchpotato import addView
|
||||||
from couchpotato.core.event import fireEvent, addEvent
|
from couchpotato.core.event import fireEvent, addEvent
|
||||||
from couchpotato.core.helpers.encoding import tryUrlencode
|
from couchpotato.core.helpers.encoding import tryUrlencode, simplifyString
|
||||||
from couchpotato.core.helpers.variable import getExt
|
from couchpotato.core.helpers.variable import getExt
|
||||||
from couchpotato.core.logger import CPLog
|
from couchpotato.core.logger import CPLog
|
||||||
from couchpotato.environment import Env
|
from couchpotato.environment import Env
|
||||||
@@ -199,6 +199,7 @@ class Plugin(object):
|
|||||||
|
|
||||||
|
|
||||||
def getCache(self, cache_key, url = None, **kwargs):
|
def getCache(self, cache_key, url = None, **kwargs):
|
||||||
|
cache_key = simplifyString(cache_key)
|
||||||
cache = Env.get('cache').get(cache_key)
|
cache = Env.get('cache').get(cache_key)
|
||||||
if cache:
|
if cache:
|
||||||
if not Env.get('dev'): log.debug('Getting cache %s' % cache_key)
|
if not Env.get('dev'): log.debug('Getting cache %s' % cache_key)
|
||||||
|
|||||||
Reference in new issue
Block a user