Caching with loading queue and event listener support