Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#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)

cache-refactor-initialization-and-cull-frequency-test.diff (4.5 KB ) - added by dauerbaustelle 14 years ago.
Refactors cache backend initialization and adds cull frequency test.

Download all attachments as: .zip

Change History (4)

by dauerbaustelle, 14 years ago

Refactors cache backend initialization and adds cull frequency test.

comment:1 by Russell Keith-Magee, 14 years ago

Triage Stage: UnreviewedReady for checkin

comment:2 by Russell Keith-Magee, 14 years ago

Resolution: fixed
Status: newclosed

(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.

comment:3 by Jacob, 13 years ago

milestone: 1.3

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top