Skip to content

Using Cache::flexible in with redis #52858

Answered by henzeb
MohamedAbdel-wahed asked this question in Q&A
Discussion options

You must be logged in to vote

ah, looking again at the code, this time rearranging it so I can actually read this, it is indeed putting in a ttl.

ttl is an array here, so you have to set the second farther away into the future thant the first one. then it might work. This is what is called the grace period. Between those two periods the old cache is still returned while the request for creating new data is being deferred so that next request can have the new data.

imho way to complex and un-laravel-like method imho.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@MohamedAbdel-wahed
Comment options

@henzeb
Comment options

Answer selected by MohamedAbdel-wahed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants