Add error checking to the cache size so small CacheSize doesn't throw an...

... exception