• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

SimpleCache vs. DataPreLoad

R

ragtek

Guest
#1
What's exactly the different between this 2?


As i've seen, both are loaded on every pageload (simplecache is loaded while preLoadData) so if i have importent data, which i could need on every page, i could store them in the simplecache, instead of dealing with the depency injection, right?
 

Mike

XenForo developer
Staff member
#2
As i've seen, both are loaded on every pageload (simplecache is loaded while preLoadData) so if i have importent data, which i could need on every page, i could store them in the simplecache, instead of dealing with the depency injection, right?
Yes. Though I'm not sure if you're referring to dependency injection, the method for varying behaviors, or injecting behaviors into the dependency object via events. I don't think the former is really feasible in this scenario, and the latter causes it to go to the data registry twice to load things, which would be avoided by using the simple cache.
 
R

ragtek

Guest
#3
I don't think the former is really feasible in this scenario, and the latter causes it to go to the data registry twice to load things, which would be avoided by using the simple cache.
OK, that's what i thought.
thx