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

SimpleCache vs. DataPreLoad

Discussion in 'XenForo Development Discussions' started by ragtek, Feb 25, 2011.

  1. ragtek

    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?
  2. Mike

    Mike XenForo Developer Staff Member

    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.
  3. ragtek

    ragtek Guest

    OK, that's what i thought.

Share This Page