each directive creates two caches #12
-
I created in a blade three separate cache directives, more precisely:
checking the debugbar though, these directives are created twice: caches are created by controller with Laravel directive, caches created by this package instead are duplicated... how come? 1 x hit article_sql_cyberpunk-laggiornamento-21-e-lultimate-edition-sono-disponibili-da-oggi.html (0%) I can't create a issue ticket, the links lead to a 404 error |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Please share the code fully. |
Beta Was this translation helpful? Give feedback.
-
Find the cache here @cache("article_{$article->id}") and @cache("article_related_{$article->id}"):
@cache("widget_game_{$giochi->id}"), Instead, it is located inside the include "elements.widget-game". |
Beta Was this translation helpful? Give feedback.
So I think you're actually reading the Debugbar output wrong.. it says that the cache key was "hit" twice, meaning it was read from twice, not created. This is because we first check to see if the cache key exists, and then retrieve the value from the cache. Creation only ever happens once in code, therefore there aren't any problems here.