Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id BE273200B6A for ; Sun, 7 Aug 2016 12:00:25 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id BCD66160A87; Sun, 7 Aug 2016 10:00:25 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 10D48160A6B for ; Sun, 7 Aug 2016 12:00:24 +0200 (CEST) Received: (qmail 91249 invoked by uid 500); 7 Aug 2016 10:00:24 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 91231 invoked by uid 99); 7 Aug 2016 10:00:24 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Aug 2016 10:00:24 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 178152C0D5D for ; Sun, 7 Aug 2016 10:00:24 +0000 (UTC) Date: Sun, 7 Aug 2016 10:00:24 +0000 (UTC) From: "Thomas Vandahl (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (JCS-45) Partial Key removal misses purgatory MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sun, 07 Aug 2016 10:00:25 -0000 [ https://issues.apache.org/jira/browse/JCS-45?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Vandahl resolved JCS-45. ------------------------------- Resolution: Fixed Fix Version/s: jcs-2.0-beta-2 Superseded by JCS-165 > Partial Key removal misses purgatory > ------------------------------------ > > Key: JCS-45 > URL: https://issues.apache.org/jira/browse/JCS-45 > Project: Commons JCS > Issue Type: Bug > Components: Indexed Disk Cache > Affects Versions: jcs-1.3 > Reporter: Philip Johnson > Assignee: Aaron Smuts > Priority: Minor > Fix For: jcs-2.0-beta-2 > > > The documentation explains that it is possible to do "hierarchical deletion" using keys with colon separators: > > I would like this feature, but it appears to be broken when DiskUsagePatternName is specified as UPDATE. I am using Java 1.6 on Windows. > Below is a short test program that illustrates the behavior. When I run this program without changes, it prints out "OK" two times. When I uncomment the setProperty() line in makeProps() and re-run the program, it prints out "Error!" twice. > --------------------------- > import java.util.Properties; > import org.apache.jcs.JCS; > import org.apache.jcs.engine.control.CompositeCacheManager; > public class JcsProblem { > private static Properties makeProps() { > Properties props = new Properties(); > props.setProperty("jcs.region.foo", "DC"); > props.setProperty("jcs.region.foo.cacheattributes", "org.apache.jcs.engine.CompositeCacheAttributes"); > props.setProperty("jcs.region.foo.MemoryCacheName", "org.apache.jcs.engine.memory.lru.LRUMemoryCache"); > // Uncomment the following line to make hierarchical removal not work. > // props.setProperty("jcs.region.foo.cacheattributes.DiskUsagePatternName", "UPDATE"); > props.setProperty("jcs.auxiliary.DC", "org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory"); > props.setProperty("jcs.auxiliary.DC.attributes", "org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes"); > props.setProperty("jcs.auxiliary.DC.attributes.DiskPath", System.getProperty("user.dir")); > return props; > } > public static void main(String[] args) throws Exception { > CompositeCacheManager ccm = CompositeCacheManager.getUnconfiguredInstance(); > ccm.configure(makeProps()); > JCS cache = JCS.getInstance("foo"); > cache.put("foo:bar:baz", "one"); > cache.put("foo:bar:qux", "two"); > cache.put("bar:quxx", "three"); > cache.remove("foo:bar:"); > System.out.println(((cache.get("foo:bar:baz") == null) ? "OK" : "Error!")); > System.out.println(((cache.get("foo:bar:qux") == null) ? "OK" : "Error!")); > } > } -- This message was sent by Atlassian JIRA (v6.3.4#6332)