Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache Not Clearing for Anonymous Users Despite Pantheon_Cache()->clean_post_cache($id) Function #298

Open
michaelvgonzaga opened this issue Aug 20, 2024 · 0 comments

Comments

@michaelvgonzaga
Copy link

Hi Advanced page cache team, posting a customer issue as Engineering team had specified this issue is on the application layer than a platform related error. Any help is highly appreciated.

For context:

Summary:
Facing an issue where the cache is not clearing for anonymous users on the production site (https://live-nuclear-threat-initiative.pantheonsite.io/) despite the Pantheon_Cache()->clean_post_cache($id) function being called. As a result, the cache age continues to increment, and stale content is being served.

Customers Affected:
All anonymous users visiting live-nuclear-threat-initiative.pantheonsite.io.

Symptoms:
The 'Age' header does not reset after the cache is supposed to be cleared.
The 'X-Cache' header consistently shows HIT, HIT, even after invoking the cache-clearing function.
Stale content is served to anonymous users, not reflecting the latest updates.
Expected Behavior:
When Pantheon_Cache()->clean_post_cache($id) is called, the cache should clear, the 'Age' header should reset to zero, and fresh content should be served to anonymous users.

Actual Behavior:
The 'Age' header does not reset and continues to increment, indicating that the cache is not being cleared, and anonymous users are served stale content.

Steps to Reproduce:

  1. Update a Post:
    Save or update a post on the live site.

  2. Check Headers:
    Before and after calling the cache-clearing function, inspect the 'Age' and 'X-Cache' headers.

  3. Test as Anonymous Users:
    Ensure the test is conducted in an anonymous or incognito browser window.
    Observe that the 'Age' header does not reset and continues to increment, indicating that the cache is not cleared.

Additional Context:

Testing and Troubleshooting:
The issue is not related to any 3rd party CDN e.g. Cloudflare, as it occurs even when accessing the site directly via Pantheon’s domain (https://live-nuclear-threat-initiative.pantheonsite.io/).

The Pantheon engineering team has confirmed that there are no platform-level issues, and they were able to replicate the problem in another environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant