Removed some duplicate code in the Api
Added the cache interface and cache object
Added the code for the default cache