implemeted db data caching