Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Cache] ArrayAdapter in current form not safe for anything but unit tests #17445

Copy link
Copy link
Closed
@andrerom

Description

@andrerom
Issue body actions

Same issue in php-cache: https://github.com/php-cache/array-adapter/issues/3
Discussion started on: #17408 (comment)

Stale cache

In current form ArrayAdapter is not really safe for applications where cache can not be stale, where stale is defined as the data placed in cache has been updated in the backend, before cache expiry time is reached.

Scenario calls for using cache invalidation instead of relying on expiry, for more on cache invalidation:

By it's nature, unlike a shared cache pool like memcached, in-memory cache like ArrayAdapter with PHP is not aware of changes going on in other php process on other web requests, another php sapi, or another web server in a cluster setup. Meaning ArrayAdapter is unsafe for use with cache invalidation.

Memory use

Current implementation also does not have any limits on cache items, meaning long running processes doing batch operations will run out of php memory.


For possible fixes see: https://github.com/php-cache/array-adapter/issues/3

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.