Feature #3041

Caching Framework - ask for validity

Added by Daniel Poetzinger over 12 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
-- undefined --
Assignee:
Category:
Cache
Start date:
2009-04-06
Due date:
% Done:

0%

Estimated time:
PHP Version:
Has patch:
Complexity:

Description

It woul be useful to ask the cache if it is still valid.

Background:
If something critical is cached - that for example depends on external (unreliable) interfaces.

This flow would be useful:
- check if cache is valid
- if not check if cached thing is available
- not available - do nothing just use the (expired cache) again
- available - flush cache and store new stuff...

Instead of (now):
- cache is expired
- cached object needs to be fetched
- if not available - nothing can be used.

#1

Updated by Robert Lemke over 12 years ago

  • Target version set to 283
#2

Updated by Robert Lemke over 12 years ago

  • Category set to Cache
  • Status changed from New to Needs Feedback
  • Assignee set to Robert Lemke
  • Priority changed from Should have to -- undefined --
  • Target version deleted (283)

I understand the use case for this, however this undermines the basic mechanisms of the caching framework which removes cache entries exactly when they become invalid (for example because a cache entry associated with a tag is removed).

How would we define when the invalid cache entry is enventually removed by the garbage collection?

In my opinion it's the application's task to determine if the cache entry is still valid. In these cases the cache entries should get an infinite expiry time from the perspective of the caching framework.

#3

Updated by Karsten Dambekalns about 12 years ago

  • Status changed from Needs Feedback to Closed
  • Target version set to 1.0 alpha 5

I agree with Robert, if you need to expire cache entries based on some external criteria, make them live forever in the FLOW3 cache and check in your application.

Also available in: Atom PDF