fix bug in cache provider