Added support for passing in size of cache