Skip to content

[Cache] ApcuAdapter cache adapter does not support customizing the marshaller #40523

@ste93cry

Description

@ste93cry

In my application I'm using the firebase/php-jwt package to parse a set of JWK keys. I want to cache those keys, however, unfortunately, the library returns them as instances of the OpenSSL Key resource. This is not a problem as long as I use a cache adapter (e.g. Redis) that supports having a custom marshaller as it allows me to serialize the data into a string and deserialize it back as a resource when I get the value from the cache, however I found out that the ApcuAdapter does not support this feature. I could imagine that maybe this hasn't been done because APCu is able to store almost everything without the need of serialization, so it makes little sense to have the ability to choose a custom marshaller. However, if this is not the reason and it makes sense to provide this feature I would be open to contribute it 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions