implemented caching for widgets