Globally cached document object and then used for locally caching in plugins