easycache
easycache copied to clipboard
How does EasyCache work?
Hi,
I wonder if I can simply use \Websanova\EasyCache\EasyCache; in my BaseModel class and then all models inheriting from that class have "transparent" caching enabled? My objection here is to reduce queries that are repeated all over again by "transparently" caching data (models).
And my models don't have id column, they have <model_name>_id. Example: my model Foo (table: foo) has a protected $primaryKey = 'foo_id'; set. Do I have to set $cacheBy in each model or does your implementation respect $primaryKey ?