Repository navigation
chore(deps): update dependency nette/caching to v4 - #345
Merged
Merged
Conversation
hrach
reviewed
Nov 8, 2026
hrach
enabled auto-merge (squash)
November 8, 2026 22:01
Contributor
Author
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
~3.1→~4.0Release Notes
nette/caching
v4.0.0: Released version 4.0.0Compare Source
Two new storages, a lock that really prevents cache stampede, and an API in which a mistake in dependencies or invalidation fails loudly instead of quietly leaving stale data in the cache.
✨ New Features
$lockTimeout)PsrCacheAdapterkeeps covering the opposite directionnew Dependencies(expire: '20 minutes', tags: [...]), or type the generator's parameter asDependencies $dpand write$dp->expire = '20 minutes'; the array withCache::*keys still works$cache->clean(tags: ["article/$id"]),priority: 100orall: trueLockingReaderinterfaceExpire,Sliding,Tags,Priorityand cleaning by namespace, which makes it a realistic stand-in in tests (#85)load(),bulkLoad()andcall()to their caller (#87)💥 Breaking Changes
{cache}tag, Latte 3.1Storage::lock()is gone; a custom storage that should generate a missing item in one process at a time implementsLockingReader::readOrGenerate().Cache::save()with a closure is deprecated, pass the closure toload()as the generatorclean()throws an exception, and so doesclean()without any condition; expired items are removed by$storage->clean([])clean(all: true)on a cache with a namespace removes only that namespace and the ones derived from it; a cache without a namespace still clears the whole storage. Cleaning byCache::Namespacesincludes the derived namespaces as wellNotSupportedExceptionfor a dependency or condition it cannot honor, such asPriorityin SQLiteStorage or cleaning by namespace in MemcachedStoragePsrCacheAdaptervalidates keys as PSR-16 requires, souser:1and other keys with{}()/\@:are rejectedIStorage,IJournalandIBulkReaderand the service aliasescacheStorageandnette.cacheJournalare removed; the UPPERCASE constants such asCache::EXPIREandCache::start()trigger a deprecation noticeThe complete list with migration hints is in
docs/upgrading.md.🐛 Bug Fixes
⚡ Performance
PsrCacheAdapter::getMultiple()reads all the keys in one bulk requestConfiguration
📅 Schedule: (UTC)
* 0-3 * * 1)🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.