Move discovery_cache_version

This commit is contained in:
Markus Unterwaditzer 2015-07-09 09:51:37 +02:00
parent fcec7e1efd
commit 8e3f0ab05f
2 changed files with 5 additions and 6 deletions

View file

@ -8,7 +8,3 @@ __version__ = pkg_resources.get_distribution('vdirsyncer').version
PROJECT_HOME = 'https://github.com/untitaker/vdirsyncer'
DOCS_HOME = 'https://vdirsyncer.readthedocs.org/en/latest'
# Increase whenever upgrade potentially breaks discovery cache and collections
# should be re-discovered
discovery_cache_version = 1

View file

@ -34,6 +34,10 @@ except ImportError:
STATUS_PERMISSIONS = 0o600
STATUS_DIR_PERMISSIONS = 0o700
# Increase whenever upgrade potentially breaks discovery cache and collections
# should be re-discovered
DISCOVERY_CACHE_VERSION = 1
class _StorageIndex(object):
def __init__(self):
@ -145,10 +149,9 @@ def get_status_name(pair, collection):
def _get_collections_cache_key(pair_options, config_a, config_b):
from vdirsyncer import discovery_cache_version
m = hashlib.sha256()
j = json.dumps([
discovery_cache_version,
DISCOVERY_CACHE_VERSION,
pair_options.get('collections', None),
config_a,
config_b