Included support for permanent caching - fixed small bug