A
A
Artyom2015-10-26 21:30:10
Yii
Artyom, 2015-10-26 21:30:10

How to properly cache ActiveQuery and ActiveRecord in Yii2?

Tell me, please, how to do this? Okay, if ActiveRecord requests can be cached somehow (and I doubt that it is correct), but how can ActiveQuery be?
PS I cache ActiveRecord like this: a shared key, first check the data, if not, then get the data and cache it. But when using it through your own requests, you can simply write cache().
Thank you all in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2015-10-26
@R0dger

I take it this is it?
https://github.com/yiisoft/yii2/blob/master/docs/g...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question