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

Calendar: Object cache not cleared #505

Open
asadowski10 opened this issue Apr 9, 2019 · 1 comment
Open

Calendar: Object cache not cleared #505

asadowski10 opened this issue Apr 9, 2019 · 1 comment

Comments

@asadowski10
Copy link

Hi team,

Since the 0.8.3 release and the feature > Improvement: Cache calendar items for each user individually to prevent potential cache pollution. Props justnorris.
We are having cache problems.
When we update content, the cached version is not updated.

The cache key is based on the user_id ( $cache_key = $post->ID . $can_modify . '_' . get_current_user_id(); ) but when you delete the cache , the key has no user_id ($post_id . 'can_modify' )
https://github.com/Automattic/Edit-Flow/blob/master/modules/calendar/calendar.php#L1800

Could you delete cache for user or remove user_id in cache key to have cache for all users ?

Thanks a lot

@mjangda
Copy link
Member

mjangda commented Oct 31, 2019

The change was introduced here #412 to make the cache user-specific. Removing the user ID would re-introduce the bug it was trying to fix (#252).

Two thoughts:

  • Find a way to clear the cache for all users (otherwise we risk showing stale data to some).
  • See if we can safely remove the HTML fragment caching and avoid all this complexity.

@mjangda mjangda added this to the 0.9.2 milestone Nov 4, 2019
@htdat htdat changed the title Object cache not cleared Calendar: Object cache not cleared Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants