mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-25 08:55:50 +00:00
Move discovery_cache_version
This commit is contained in:
parent
fcec7e1efd
commit
8e3f0ab05f
2 changed files with 5 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue