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

Disable cache TTL by default #17

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

stevedlawrence
Copy link
Member

The current cache TTL default is 30 minutes, which is relatively short and could easily lead to hiccups if there is a lull in data, a schema is removed from the cache and Daffodil needs to recompile it when data starts flowing again.

To avoid these hiccups, this changes the default to 0 seconds, which means to never remove schemas from the cache. In most cases, if a user uses a schema once they are probably going to use it again, so this avoids recompilations that could lead to unexpected latencies.

to zero (e.g. "0 seconds"), cached compiled DFDL schemas are never removed from the cache. The default value
is 30 minutes.
<tt>&lt;time_unit&gt;</tt> is a supported unit of time, such as nanos, millis, secs, mins, hrs, days. The
default is "0 seconds", which means compiled DFDL schemas are never removed from the cache.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you do if the schema has been changed and you want to remove it from the cache? You need to explain here what do do about this never-expires setting to manually manage the cache.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the cache is reset by restarting the processor, I'll confirm and add a note.

The current cache TTL default is 30 minutes, which is relatively short
and could easily lead to hiccups if there is a lull in data, a schema is
removed from the cache and Daffodil needs to recompile it when data
starts flowing again.

To avoid these hiccups, this changes the default to 0 seconds, which
means to never remove schemas from the cache. In most cases, if a user
uses a schema once they are probably going to use it again, so this
avoids recompilations that could lead to unexpected latencies.
@stevedlawrence stevedlawrence merged commit afd0d57 into OwlCyberDefense:master Jan 30, 2024
6 checks passed
@stevedlawrence stevedlawrence deleted the zero-ttl branch January 30, 2024 20:17
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.

2 participants