File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,18 @@ To invalidate tags, call the method `Psr6Store::invalidateTags` or use the
103103` PurgeTagsListener ` from the [ FOSHttpCache] [ 3 ] library to handle tag
104104invalidation requests.
105105
106+ ### Pruning Expired Cache Entries
107+
108+ By default, this cache removes expired entries from the cache after every 500
109+ cache write operations. You can change the frequency with the ` prune_threshold `
110+ configuration setting.
111+
112+ You can also manually trigger pruning by calling the ` prune() ` method on the
113+ cache. With this, you could for example implement a cronjob that loads the store
114+ and prunes it at a configured interval, to prevent slowing down random requests
115+ that were cache misses because they have to wait for the pruning to happen. If you
116+ have set up a cron job, you should disable pruning by setting the threshold to 0.
117+
106118### WARNING
107119
108120It is possible to configure other cache adapters or lock stores than the
You can’t perform that action at this time.
0 commit comments