-
Notifications
You must be signed in to change notification settings - Fork 450
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1650 from pbiering/no-cache-invalidation-on-upgrade
No cache invalidation on upgrade
- Loading branch information
Showing
4 changed files
with
20 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
# Copyright © 2008 Nicolas Kandel | ||
# Copyright © 2008 Pascal Halter | ||
# Copyright © 2008-2017 Guillaume Ayoub | ||
# Copyright © 2017-2019 Unrud <[email protected]> | ||
# Copyright © 2017-2023 Unrud <[email protected]> | ||
# Copyright © 2024-2024 Peter Bieringer <[email protected]> | ||
# | ||
# This library is free software: you can redistribute it and/or modify | ||
|
@@ -301,7 +301,7 @@ def serve(configuration: config.Configuration, | |
""" | ||
|
||
logger.info("Starting Radicale") | ||
logger.info("Starting Radicale (%s)", utils.packages_version()) | ||
# Copy configuration before modifying | ||
configuration = configuration.copy() | ||
configuration.update({"server": {"_internal_server": "True"}}, "server", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
# Copyright © 2014 Jean-Marc Martins | ||
# Copyright © 2012-2017 Guillaume Ayoub | ||
# Copyright © 2017-2022 Unrud <[email protected]> | ||
# Copyright © 2024-2024 Peter Bieringer <[email protected]> | ||
# | ||
# This library is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
|
@@ -35,17 +36,19 @@ | |
from radicale import item as radicale_item | ||
from radicale import types, utils | ||
from radicale.item import filter as radicale_filter | ||
from radicale.log import logger | ||
|
||
INTERNAL_TYPES: Sequence[str] = ("multifilesystem", "multifilesystem_nolock",) | ||
|
||
CACHE_DEPS: Sequence[str] = ("radicale", "vobject") | ||
CACHE_VERSION: bytes = "".join( | ||
"%s=%s;" % (pkg, utils.package_version(pkg)) | ||
for pkg in CACHE_DEPS).encode() | ||
# NOTE: change only if cache structure is modified to avoid cache invalidation on update | ||
CACHE_VERSION_RADICALE = "3.3.1" | ||
|
||
CACHE_VERSION: bytes = ("%s=%s;%s=%s;" % ("radicale", CACHE_VERSION_RADICALE, "vobject", utils.package_version("vobject"))).encode() | ||
|
||
|
||
def load(configuration: "config.Configuration") -> "BaseStorage": | ||
"""Load the storage module chosen in configuration.""" | ||
logger.debug("storage cache version: %r", str(CACHE_VERSION)) | ||
return utils.load_plugin(INTERNAL_TYPES, "storage", "Storage", BaseStorage, | ||
configuration) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters