updates to cache and cookie functionality