mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +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'
|
PROJECT_HOME = 'https://github.com/untitaker/vdirsyncer'
|
||||||
DOCS_HOME = 'https://vdirsyncer.readthedocs.org/en/latest'
|
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_PERMISSIONS = 0o600
|
||||||
STATUS_DIR_PERMISSIONS = 0o700
|
STATUS_DIR_PERMISSIONS = 0o700
|
||||||
|
|
||||||
|
# Increase whenever upgrade potentially breaks discovery cache and collections
|
||||||
|
# should be re-discovered
|
||||||
|
DISCOVERY_CACHE_VERSION = 1
|
||||||
|
|
||||||
|
|
||||||
class _StorageIndex(object):
|
class _StorageIndex(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
@ -145,10 +149,9 @@ def get_status_name(pair, collection):
|
||||||
|
|
||||||
|
|
||||||
def _get_collections_cache_key(pair_options, config_a, config_b):
|
def _get_collections_cache_key(pair_options, config_a, config_b):
|
||||||
from vdirsyncer import discovery_cache_version
|
|
||||||
m = hashlib.sha256()
|
m = hashlib.sha256()
|
||||||
j = json.dumps([
|
j = json.dumps([
|
||||||
discovery_cache_version,
|
DISCOVERY_CACHE_VERSION,
|
||||||
pair_options.get('collections', None),
|
pair_options.get('collections', None),
|
||||||
config_a,
|
config_a,
|
||||||
config_b
|
config_b
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue