Skip to content

[BUG]: Metadata cache reset flushes whole redis #16764

Open
@hostaway-greg

Description

@hostaway-greg

Describe the bug
When you use metadata cache with redis adapter, and you call $cache->reset() it sends flushdb to redis server. This clears whole redis database, which can cause a lot of issues.

Expected behavior
Either clear only set keys (store keys internally in Redis adapter) or maybe use prefix mechanism?

Also, documentation should reflect this.

I did not check other adapters.

Details

  • Phalcon version: 5.6.2
  • PHP Version: 8.5.2
  • Operating System: Linux
  • Installation type: compiled from source
  • Server: nginx + fpm

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

5.0The issues we want to solve in the 5.0 releasebugA bug reportstatus: highHigh

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions