Added functions to clean cache by tag and get key value hierarchy