Use a cache directory, and build subdirectories of it. Set and get the cache directory, and define clear_cache function