Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292377

Remove CacheBackendInterface::deleteExpired()

$
0
0

The methods CacheBackendInterface::deleteExpired() and CacheBackendInterface::garbageCollection() seems redundant. It's hard to see a use-case for deleteExpired() other than garbage collection.

In general you would rather use garbageCollection() and then leave it up to the cache backend to decide what should be garbage collected. If you have enough storage capacity, you may want to keep expired items around for some time.

deleteExpired() is easy to implement for the database cache backends, but other backends may not have a similar mechanism for looking up all expired items. They would have to resort to complex mechanisms like that we have for tag invalidation. I don't see a strong use-case for deleteExpired() that justifies putting this burden on cache backend developers.

So I suggest removing deleteExpired().

AttachmentSizeStatusTest resultOperations
delete-expired-1.patch7.09 KBIdlePASSED: [[SimpleTest]]: [MySQL] 53,131 pass(es).View details | Re-test

Viewing all articles
Browse latest Browse all 292377

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>