Added caching for non RDF resources.