Skip to content

bug: proxy-cache inconsistent behaviours for in-memory and on-disk caching when the cache expires #11045

Description

@kayx23

Current Behavior

inconsistent response headers for in-memory and on-disk cache when the cache expires.

  • for on disk strategy, the header shows Apisix-Cache-Status: EXPIRED
  • for in memory strategy, the headers shows Apisix-Cache-Status: MISS

Expected Behavior

Same header value for both caching strategies when the cache expires.

Steps to Reproduce

disk based caching

  1. Enable proxy-cache on a route and configure it to use disk based caching
  2. Send a few requests and observe caching in effect
  3. Wait for the cache to expire after TTL and send another request, to observe Apisix-Cache-Status: EXPIRED header

in memory caching

  1. Enable proxy-cache on a route and configure it to use disk based caching
  2. Send a few requests and observe caching in effect
  3. Wait for the cache to expire after TTL and send another request, to observe Apisix-Cache-Status: MISS header

Environment

  • APISIX version (run apisix version): 3.8.0

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status
✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions