Commits

Boris Nagaev  committed 4c940da

CachedContents: add function remove_from_cache()

It was used in thechess from Sep 2013 but was not added
to this repo for some reason.

  • Participants
  • Parent commits daaac9f

Comments (0)

Files changed (2)

File src/CachedContents.cpp

     current_widget_ = 0;
 }
 
+void CachedContents::remove_from_cache(const std::string& url) {
+    url_to_widget_.erase(url);
+}
+
 void CachedContents::resize_cache() {
     int desired_size = cache_size();
     if (desired_size < 0) {

File src/CachedContents.hpp

     /** Clear cache and widget */
     void clear_cache();
 
+    /** Remove cached widget with this URL */
+    void remove_from_cache(const std::string& url);
+
 protected:
     /** Update visible contents of widget according to the URL (implementation).
     The function is invoked from open_url() if this URL is not in cache.