question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Option to set the cache lifetime

See original GitHub issue

Caches that are not accessed within the last week will also be evicted.

Along with the usual usage of this package I also use it to only conditionally release my library. For this I cache a version file (Which is automatically bumped on release and contains only the version number) so this action can tell me when it’s changed, because of the hashed keys.

This solution has been really useful and easy to set up, but now a week has passed and I now understand why this job fails.

If for this cache only I could set the lifetime to infinite my problem would be solved.

(Another option would be useful to not litter the cache with these little version files is a maxCaches option, I don’t know if there is an option for that)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dhadkacommented, Sep 11, 2020

Regardless of my problem, I think options like this would be a nice addition!

Yeah, I actually started a side project during a company hackathon last week that gives users more freedom in how they store and manage files. It has a “time to live” field that would do exactly what you are asking for. It still needs some work, especially on the AWS S3 side, so I wouldn’t recommend it just yet. But it’s open for contributions - https://github.com/dhadka/stockpile

0reactions
Phantsurecommented, May 31, 2022

@AlexAegis @pbrezina Closing this. This seems like a feature request which currently is not in near scope.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cache-Control - HTTP - MDN Web Docs
The Cache-Control HTTP header field holds directives ... the browser cache would deduct 100 seconds from its freshness lifetime.
Read more >
Setting a Cache Expiry Time | CDN Static - CDNsun
The Cache Expiry Time option of both Static and Static Push CDN services allows you to control cache system on our CDN edge...
Read more >
Managing page cache lifetime (TTL) - WordPress.org
As I understand W3TC allows to set lifetime for page cache (server side cache) with option “Expires header lifetime” in HTML-section of Browser...
Read more >
[EX/QFX] Understanding the SNMP stats-cache-lifetime option
Note: stats-cache-lifetime is a hidden option. Manually type full keyword to complete the configuration. Run the following script on the SNMP ...
Read more >
Caching - Akamai TechDocs
If you selected Allow caching,, 1. From the Cache lifetime menu, select the option for the maximum lifetime of cached objects. This determines...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found