surface get(const std::string& key) { surface surf = cache().get(key); if(surf.null()) { surf = get_no_cache(key); cache().put(key,surf); } return surf; }
surface get(const std::string& key) { surface surf = cache().get(key).surf; if(surf.null()) { CacheEntry entry; surf = entry.surf = get_no_cache(key, &entry.fname); if(entry.fname.empty() == false) { entry.mod_time = sys::file_mod_time(entry.fname); } cache().put(key,entry); } return surf; }