change Clear() to Reset()
these constants are better than lots of bools
deleting a resource will kill the cache