1. A caching method comprising: analyzing a structure of a resource in a system which exposes resources to clients; generating a dependency graph of objects linked to the resource based on the analyzed structure of the resource, wherein the generated dependency graph comprises hierarchical dependency information with respect to the objects linked to the resource; receiving a request to delete or modify the resource; and upon making a determination that the resource is stored in a cache associated with the system: locating a vertex in the dependency graph for the resource based on an entity tag for the resource retrieved from an entity tag mapping table; identifying a sub-graph based on the vertex in the dependency graph; and removing the resource and related resources from the cache based on the identified sub-graph.