bug: Fix the size not being reset to 0 when the cache clears itself

When the cacheFlushInterval is set the cache wasn't reseting its size when it cleared itself.

fixes #14
Merge pull request #16 from jmdobry/bug-reset-cache-size

bug: Fix the size not being reset to 0 when the cache clears itself