better structure for cache purge