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

Add soft TTL to Query Cache entries #4086

Merged
merged 4 commits into from
Jan 28, 2023
Merged

Add soft TTL to Query Cache entries #4086

merged 4 commits into from
Jan 28, 2023

Conversation

javsanpar
Copy link
Contributor

@javsanpar javsanpar commented Jan 23, 2023

When Query Cache entries reach the soft ttl, the next query hit the
backend and refresh the entry. While the refresh happens, other queries
keeps getting the "old" Query Cache entry.

Soft ttl is a percentage of the cache ttl and is defined by a global
variable for all the entries. If the value is 0, soft ttl is disabled
and no used.

Related to issue #1486

@javsanpar javsanpar force-pushed the v2.x-1486 branch 2 times, most recently from 72f6441 to 882e142 Compare January 25, 2023 10:26
@javsanpar javsanpar changed the title Issue #1486 Add soft TTL to Query Cache entries Jan 25, 2023
When Query Cache entries reach the soft ttl, the next query hit the
backend and refresh the entry. While the refresh happens, other queries
keeps getting the "old" Query Cache entry.

Soft ttl is a percentage of the cache ttl and is defined by a global
variable for all the entries. If the value is 0, soft ttl is disabled
and no used.
@javsanpar javsanpar force-pushed the v2.x-1486 branch 3 times, most recently from e7c8f69 to e8b1897 Compare January 26, 2023 10:35
@renecannao renecannao marked this pull request as ready for review January 27, 2023 12:23
@renecannao renecannao merged commit 62182da into v2.x Jan 28, 2023
@anuragagarwal561994
Copy link

@renecannao @javsanpar is there a way with which one can decide if the current call itself be served from the cache and it just initiates the refresh call. Like why to even make the current call wait for the actual db call.

@renecannao renecannao deleted the v2.x-1486 branch August 29, 2024 11:23
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

Successfully merging this pull request may close these issues.

3 participants