Allows setting of the cache size and fixes #68