Caching was fixed to work for not declared resources also