Client side smart caching implementation