php简单缓存类

I'm using this simple PHP caching class in my script.

It's working fine but the problem arises when I make change in to the database like adding comments, login or any other change, it doesn't appear on the page.

So, is there anything I can do to solve this problem.

http://devgrow.com/simple-cache-class/

Shows a function called purge - passing in the location. Would it be possible to get the location and purge it on a DB update.

Taken from the site:

The last two functions are used for deleting cache files. The purge function takes a location (full URL for now) and marks it for deletion"