| 88 | } |
| 89 | |
| 90 | Valdi::Ref<ImageCacheItem> ImageCacheItem::getResized(const String& url, int width, int height) { |
| 91 | _variants++; |
| 92 | auto strongRef = Valdi::strongSmallRef(this); |
| 93 | return Valdi::makeShared<ImageCacheItem>(url, strongRef, _image->resized(width, height)); |
| 94 | } |
| 95 | |
| 96 | bool ImageCacheItem::isExpired(snap::utils::time::Duration<std::chrono::steady_clock> time) const { |
| 97 | return time >= _lastAccessed; |
no test coverage detected