Added mechanism for caching tiles