Feature #3041

Caching Framework - ask for validity

Added by Daniel Poetzinger over 6 years ago. Updated almost 5 years ago.

Status:Closed Start date:2009-04-06
Priority:-- undefined -- Due date:
Assigned To:Robert Lemke % Done:

0%

Category:Cache
Target version:TYPO3 Flow Base Distribution - 1.0 alpha 5
PHP Version: Complexity:
Has patch:

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.

History

#1 Updated by Robert Lemke about 6 years ago

  • Target version set to 283

#2 Updated by Robert Lemke about 6 years ago

  • Category set to Cache
  • Status changed from New to Needs Feedback
  • Assigned To 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 almost 6 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