Author: asmuts
Date: Sat Aug 26 09:13:13 2006
New Revision: 437176

URL: http://svn.apache.org/viewvc?rev=437176&view=rev
Log:
added faq entry on multiple removes

Modified:
    jakarta/jcs/trunk/xdocs/faq.fml

Modified: jakarta/jcs/trunk/xdocs/faq.fml
URL: 
http://svn.apache.org/viewvc/jakarta/jcs/trunk/xdocs/faq.fml?rev=437176&r1=437175&r2=437176&view=diff
==============================================================================
--- jakarta/jcs/trunk/xdocs/faq.fml (original)
+++ jakarta/jcs/trunk/xdocs/faq.fml Sat Aug 26 09:13:13 2006
@@ -149,7 +149,7 @@
                                        </a>
                                        or get the source code from subversion 
with svn co
                                        
http://svn.apache.org/repos/asf/jakarta/jcs/trunk.
-                                       The tagged releases are available with 
svn co.  ex.
+                                       The tagged releases are available with 
svn co. ex.
                                        
http://svn.apache.org/repos/asf/jakarta/jcs/tags/jcs_1_2_7_0
                                </p>
                        </answer>
@@ -203,6 +203,38 @@
                                        for more information on how to handle 
element
                                        events.
                                </p>
+                       </answer>
+               </faq>
+
+               <faq id="hierarchical-removal">
+                       <question>
+                               Can I remove all items begging with part of a 
key?
+                       </question>
+                       <answer>
+                               <p>
+                                       Yes, but it is somewhat expensive, 
since some of the
+                                       auxiliaries will have to iterate over 
their keysets.
+                                       Although all the auxiliaries honor 
this, it is not
+                                       part of the auxiliary API. There is no 
method along
+                                       the lins of "removeStartingWith", but 
all the remove
+                                       methods can do it.
+                               </p>
+                               <p>
+                                       By default, the hierarchical key 
delimiter used in
+                                       JCS is a colon. You cannot add a String 
key that
+                                       ends with a colon. If you call remove 
with a String
+                                       key that ends in a colon, everything 
that has a key
+                                       that starts with the argument will be 
removed.
+                               </p>
+                               <p>If your keys are in this format</p>
+                               <p>TYPE:SOURCE:OBJECT</p>
+                               <p>
+                                       And you put n objects int he cache with 
keys like
+                                       this
+                               </p>
+                               <p>"ABC:123:0" to "ABC:123:n"</p>
+                               <p>then you could remove all the obejcts by 
calling</p>
+                               <p>jcs.remove( "ABC:123:" );</p>
                        </answer>
                </faq>
        </part>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to