adding implementation for the cache methods