-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bypass storage for functions whose TTL is 0 (#32)
* Bypass storage for functions whose TTL is 0 Functions whose TTL is set to 0 will try to retrieve the cached value from storage, even when the value is never stored in the first place. We should bypass storage completely, to avoid the performance hit of the additional lookup. * Ensure ttl is a positive integer The async-cache-dedupe library assumes that TTLs are positive integers greater than 0. If the Cache or function definitions use fractional TTLs (e.g. `0 < ttl < 1`), it can cause odd behaviors. So this change introduces additional validation to ensure the values are rejected.
- Loading branch information
Showing
3 changed files
with
55 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters