Noob to cache - question

0xym0r0n

Well-known member
So this


Code:
$value = XenForo_Model::create('XenForo_Model_DataRegistry')->get('yourKey');
reference: http://xenforo.com/community/thread...ll-users-over-several-runs.33600/#post-382901

vs

Code:
 return $this->getModelFromCache ('yourKey');

In ControllerPublic...


I see that the mb size and queries are the same for my add-on when I switch between them. Is there no difference other than how much it can store?
Which would you use?
I'm retrieving a variable amount of items which can be large and small. For now I'm using the getModelFromCache.

I'm new to MVC and I'm new to cacheing data :p Pardon this special question please.
Thanks <3
 
I believe getModelFromCache uses the first bit of code internally. The controllers just have a wrapper function (a rather common practice really).
 
Back
Top Bottom