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

Select activities cache is not invalidated after a change #121

Open
ilicfilip opened this issue Nov 13, 2024 · 0 comments
Open

Select activities cache is not invalidated after a change #121

ilicfilip opened this issue Nov 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ilicfilip
Copy link
Collaborator

There is a helper method for fetching activities from our custom DB table and it uses wp_cache_set and wp_cache_get functions in order to cache the results. Hashed query arguments are used as a cache key.

The problem is that cache is not invalidated after a change was made to the to the activities, for example:

  1. Select all activities for a post
  2. Insert new activities for the post
  3. Run the same query as in 1)

Second query will return results results which were cached in 1), omitting the change which was made in 2)
Since cache is not persistent it is not a problem for now, but it can result in some weird behaviour in the future and it definitely needs to be fixed.

@ilicfilip ilicfilip added the bug Something isn't working label Nov 13, 2024
@ilicfilip ilicfilip assigned aristath and jdevalk and unassigned jdevalk and aristath Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants