Hey everyone,
Question on cacheing & app architecture.
I have some selects I would like to cache for speedup, specifically in redis, but on a more abstract level, I have a question.
I have modularized most of my functions so I can efficiently iterate the application, and can unit test effectively.
In production, I'd like to have the selects cached for speed, but I don't want to pass in a cache object for every possible unit test.
Instead, I'd like to have global access to the cache, and turn it on and off with a global variable for testing.
I understand cache is a global variable with access to the web2py environment.
Can anyone forsee any problems with implementation of cacheing within a module that is NOT specifically passed in from the web2py environment, but rather imported externally? (I understand this is a hard question to answer, but I'm more just looking for : You're an idiot you completely forgot X).
Thank you all in advance.
Looking forward to seeing you at web2pycon2015!
-Mark