Open cherifGsoul opened 8 years ago
from a quick look it seems you just need to set the dependency to be reuseable: http://www.yiiframework.com/doc-2.0/yii-caching-dependency.html#$reusable-detail
@cebe thank you for the answer it works like a charm :+1:
still weird that it generates 4 queries, should be checked.
I dont find any test for DbDependency component, can someone point me to the right test?
I'm afraid there is none, it should be in https://github.com/yiisoft/yii2/tree/master/tests/framework/caching
I have this code:
I was surprised by the number of the sql query executed with the
sql
param, it generates 4 queriesI wonder if this is a bug or is the default behavior of the framework? The
yii\caching\FileCache
was used.