expires_in key for cache #20
Unanswered
Stanislav-Lapata
asked this question in
Q&A
Replies: 1 comment
-
I also need expires_in for caching. Any chance we could incorporate/revisit this? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In our project we have explosive load on the server but it usually take few minutes and I need to cache date from 1 to 10 minutes.
Rails.cache.fetch
andActiveSupport::Cache::MemoryStore.new.fetch
can acceptexpires_in
key as the second argfor example
As I understand right I can't use
expires_in
key right nowhttps://github.com/ElMassimo/oj_serializers/blob/v2.0.3/lib/oj_serializers/serializer.rb#L250-L251
Is it possible to add new method that will extend the second arg or add new arg to cached/cached_with_key?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions