Django

Code

Ticket #3290 (closed: fixed)

Opened 2 years ago

Last modified 2 years ago

[patch] Dummy cache class doesn't conform to BaseCache interface

Reported by: Ned Batchelder <ned@nedbatchelder.com> Assigned to: jacob
Milestone: Component: Cache system
Version: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

The Dummy cache (django.core.cache.backends.dummy) doesn't implement the BaseCache? interface in two ways:

1) get() doesn't return the value of its default argument.

2) get_many() doesn't return a dictionary.

This patch trivially fixes the Dummy class to behave properly.

Attachments

3290_DummyCache_patch.diff (0.6 kB) - added by Ned Batchelder <ned@nedbatchelder.com> on 01/12/07 09:01:32.

Change History

01/12/07 09:01:32 changed by Ned Batchelder <ned@nedbatchelder.com>

  • attachment 3290_DummyCache_patch.diff added.

01/12/07 09:01:53 changed by Ned Batchelder <ned@nedbatchelder.com>

  • summary changed from Dummy cache class doesn't conform to BaseCache interface to [patch] Dummy cache class doesn't conform to BaseCache interface.

01/12/07 09:16:55 changed by jacob

  • status changed from new to closed.
  • resolution set to fixed.

(In [4308]) Fixed #3290: DummyCache? now conforms to the BaseCache? interface correctly. Thanks, Ned Batchelder.


Add/Change #3290 ([patch] Dummy cache class doesn't conform to BaseCache interface)




Change Properties
Action