Improved caching system.
Improved the structure of caching system.
Fixed minor bugs in the caching system.
widget cache code cleanup and bug fixes.