moved cache object to lib