Skip to content

[cache] Make cache item expiry accessible #34487

@drzraf

Description

@drzraf

Description
I would like read-only access to CacheItem->expiry, eg via a getExpiry() method.

Example
I use cache as a kind of locally-stored-expiring-lock in order to avoid reissuing a (temporary) failed HTTP request during a given time.
When checking for the cacheItem I would like to access the expiry.
My use-case is that I can issue a request short before cache actually expire and progressively increase its expiration time (like 1 hour, 3 hours, 6 hours, ...).

Reference:
https://stackoverflow.com/questions/58527540/how-to-get-expiration-datetime-of-items-using-symfonys-cache-component

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy