Browse Source

Update cache version

pull/165/head
Oliverpool 9 years ago
parent
commit
8516f3bfa0
  1. 7
      patacrep/songs/__init__.py

7
patacrep/songs/__init__.py

@ -80,7 +80,7 @@ class Song:
# Version format of cached song. Increment this number if we update
# information stored in cache.
CACHE_VERSION = 2
CACHE_VERSION = 3
# List of attributes to cache
cached_attributes = [
@ -156,10 +156,7 @@ class Song:
"""If relevant, retrieve self from the cache."""
if self.use_cache and os.path.exists(self.cached_name):
try:
cached = pickle.load(open(
self.cached_name,
'rb',
))
cached = pickle.load(open(self.cached_name, 'rb',))
if (
cached['_filehash'] == self.filehash
and cached['_version'] == self.CACHE_VERSION

Loading…
Cancel
Save