adding a caching mechanism by using 'memcache' to reduce the number of database hits