差異處
這裏顯示兩個版本的差異處。
Both sides previous revision 前次修改 下次修改 | 前次修改 | ||
java:guava:suppliers:file_changed_cache [2016/08/12 18:02] tony [How to?] |
java:guava:suppliers:file_changed_cache [2023/06/25 09:48] (目前版本) |
||
---|---|---|---|
行 146: | 行 146: | ||
} | } | ||
</code> | </code> | ||
+ | 也許應該設計成Event-based的Eviction? | ||
+ | ===== 後記 ===== | ||
+ | 在Linux上發現,如果修改時間間格非常短(1秒以下)有可能偵測不出來。如果不在意或不影響的就維持目前作法;如果在意可能就要改用[[https://docs.oracle.com/javase/tutorial/essential/io/notification.html|File WatchService]]。 | ||
===== Reference ===== | ===== Reference ===== | ||
* [[https://github.com/google/guava/wiki/CachesExplained|Guava - CachesExplained]] | * [[https://github.com/google/guava/wiki/CachesExplained|Guava - CachesExplained]] |