added support for cacheTime to be 0 (infinite). Layed out cleanCache()