SimpleCache vs. DataPreLoad

  • Thread starter Thread starter ragtek
  • Start date Start date
R

ragtek

Guest
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?
 
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.
 
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
 
Top Bottom