added test code for cache