caching frequently accessed document elements