]> kaliko git repositories - mpd-sima.git/blobdiff - sima/plugins/internal/lastfm.py
http client hardcoded caching (workaround for #7)
[mpd-sima.git] / sima / plugins / internal / lastfm.py
index 125f0090291655dc60656998b5a541a36869e6cd..280519729bbafec13de7aff60f7ea5fc20514169 100644 (file)
@@ -30,6 +30,7 @@ from os.path import join
 from ...lib.simafm import SimaFM
 from ...lib.webserv import WebService
 from ...lib.cache import FileCache
+from ...lib.http import CacheController
 
 
 class Lastfm(WebService):
@@ -42,6 +43,7 @@ class Lastfm(WebService):
         vardir = daemon.config['sima']['var_dir']
         persitent_cache = daemon.config.getboolean('lastfm', 'cache')
         if persitent_cache:
+            CacheController.CACHE_ANYWAY = True
             self.log.debug('Persistant cache enabled in {}'.format(join(vardir, 'http', 'LastFM')))
             SimaFM.cache = FileCache(join(vardir, 'http', 'LastFM'))
         self.ws = SimaFM()