Various fixes I've found and expanded/tested your initial Caching impl.

Hopefully these are useful.
Your feedback is appreciated

Kind Regards,
Wez