#14596 closed (fixed)
Cache backend initialization refactoring
Reported by: | dauerbaustelle | Owned by: | nobody |
---|---|---|---|
Component: | Core (Cache system) | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The attached patch refactors the initialization code shared between the locmem, filesystem and database cache backends into the BaseCache
class' __init__
method.
Furthermore, it extends the tests so that the backends' code is tested with cull_frequency=0
. (Filebased cache excluded, because it seems like its culling behaviour is somewhat unpredictable.)
Plus it puts the hairy pseudo-model stuff in the database cache backend into a superclass to make inheritance more obvious for 3rd-party database backends.
Attachments (1)
Change History (4)
by , 14 years ago
Attachment: | cache-refactor-initialization-and-cull-frequency-test.diff added |
---|
comment:1 by , 14 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
comment:2 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [14434]) Fixed #14596 -- Light refactoring of the cache backends.
- Removes some code duplication,
- Provides a convenient base class for db-like cache backends
- Adds tests for an edge case of culling,
- Marks the memcached tests as "skipped", rather than omitting them.
Thanks to Jonas H for the patch.
Refactors cache backend initialization and adds cull frequency test.