Change caching system to make it pluggable,
Created a db cache ability