From aaf7a0feaad173a435b680408258678d0bb4a4cc Mon Sep 17 00:00:00 2001 From: orbiter Date: Thu, 15 Sep 2011 22:40:01 +0000 Subject: [PATCH] yet another cache strategy git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7959 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- .../federated/yacy/CacheStrategy.java | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/source/net/yacy/cora/services/federated/yacy/CacheStrategy.java b/source/net/yacy/cora/services/federated/yacy/CacheStrategy.java index e61783b8c..95bba3aab 100644 --- a/source/net/yacy/cora/services/federated/yacy/CacheStrategy.java +++ b/source/net/yacy/cora/services/federated/yacy/CacheStrategy.java @@ -29,16 +29,30 @@ public enum CacheStrategy { /** Never use the cache, all content from fresh internet source. */ NOCACHE(0), + /** Use the cache if the cache exists and is fresh using the - * proxy-fresh rules. */ + * proxy-fresh rules. + */ IFFRESH(1), + /** Use the cache if the cache exists. Do not check freshness. Otherwise - * use online source. */ + * use online source. + */ IFEXIST(2), + /** Never go online, use all content from cache. If no cache entry exist, - * consider content nevertheless as available */ - CACHEONLY(3); - // the fifth case may be that the CacheStrategy object is assigned NULL. That means that no snippet creation is wanted. + * consider content nevertheless as available + */ + CACHEONLY(3), + + /** create a snippet that does not necessarily contain the searched word, + * but has a pretty description of the content instead + */ + NIFTY(4); + + /** the fifth case may be that the CacheStrategy object is assigned NULL. + * That means that no snippet creation is wanted. + */ public int code;