Change the cache and add dispose() method