trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dia...@apache.org
Subject svn commit: r897312 - /incubator/trafficserver/site/trunk/docs/admin/cache.htm
Date Fri, 08 Jan 2010 20:05:38 GMT
Author: dianes
Date: Fri Jan  8 20:05:37 2010
New Revision: 897312

URL: http://svn.apache.org/viewvc?rev=897312&view=rev
Log:
Added "Removing Object From Cache" section

Modified:
    incubator/trafficserver/site/trunk/docs/admin/cache.htm

Modified: incubator/trafficserver/site/trunk/docs/admin/cache.htm
URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/admin/cache.htm?rev=897312&r1=897311&r2=897312&view=diff
==============================================================================
--- incubator/trafficserver/site/trunk/docs/admin/cache.htm (original)
+++ incubator/trafficserver/site/trunk/docs/admin/cache.htm Fri Jan  8 20:05:37 2010
@@ -18,6 +18,7 @@
 <li><a href="#PartitioningCache">Partitioning the Cache</a></li>
 <li><a href="#ConfiguringCacheObjectSizeLimit">Configuring the Cache Object Size
Limit</a></li>
 <li><a href="#ClearingCache">Clearing the Cache</a></li>
+<li><a href="#RemoveObjectFromCache">Removing an Object From the Cache</a></li>
 <li><a href="#InspectingCache">Inspecting the Cache</a></li>
 </ul>
 <h2 id="TrafficEdgeCache">The Traffic Server Cache</h2>
@@ -134,6 +135,7 @@
   <li>Run the command <code>traffic_line -x</code> to apply the configuration
changes. </li>
 </ol>
 <h2 id="ClearingCache">Clearing the Cache</h2>
+
 <p>When you clear the cache, you remove all data from the entire cache - including
 data in the host database. You should clear the cache before performing certain cache configuration
tasks, such as partitioning. You cannot clear the cache when Traffic Server is running. </p>
 <h5>To clear the cache: </h5>
 <ol>
@@ -141,6 +143,19 @@
   <li>Enter the following command to clear the cache:<br /><code>traffic_server
-Cclear</code><br />The <code>clear</code> command deletes all data
in the object store and the host database. Traffic Server does not prompt you to confirm the
deletion.  </li>
   <li>Restart Traffic Server (refer to <a href="getstart.htm#StartingTrafficEdge">Starting
Traffic Server</a>).</li>
 </ol>
+
+<h2 id="RemoveObjectFromCache">Removing an Object From the Cache</h2>
+<p>Traffic Server accepts the custom HTTP request method <code>PURGE</code>
when removing a specific object from cache. If the object is found in the cache and is successfully
removed, then Traffic Server responds with a <code>200 OK </code> HTTP message;
otherwise, a <code>404 File Not Found</code> message is returned. </p>
+<p>In the following example, Traffic Server is running on the domain <u><code>examplex.com</code></u>
and you want to remove the image <code>remove_me.jpg</code> from cache:</p>
+<p><code>$ curl -X PURGE -v "http://examplex.com/remove_me.jpg"</code></p>
+<p><code>* About to connect() to examplex.com port 80 (#0) <br /> 
+  * Trying 192.0.32.11... connected <br />
+  * Connected to examplex.com (192.0.32.11) port 80 (#0)</code></p>
+<p><code> &gt; PURGE /remove_me.jpg HTTP/1.1  <br />  &gt; User-Agent:
curl/7.19.7   <br /> 
+  &gt; Host: examplex.com   <br /> &gt; Accept: */*  <br />  &gt;
<br />  &lt; HTTP/1.1 200 Ok  <br /> 
+  &lt; Date: Thu, 08 Jan 2010 20:32:07 GMT  <br /> &lt; Connection: keep-alive</code></p>
+<p>The next time Traffic Server receives a request for the removed object, it will
contact the origin server to retrieve it (i.e., it has been purged from the Traffic Server
cache).</p>
+<p>Note: The procedure above only removes an object from a <i>specific</i>
Traffic Server cache. Users may still see the old (removed) content if it was cached by intermediary
caches or  by the end-users' web browser.</p>
 <h2 id="InspectingCache">Inspecting the Cache</h2>
 <p>Traffic Server provides a Cache Inspector utility that enables you to view, delete,
and invalidate URLs in the cache (HTTP only). The Cache Inspector utility is a powerful tool
that's capable of deleting <i>all</i> the objects in your cache; therefore, make
sure that only authorized administrators are allowed to access this utility. To control which
hosts have access via  the <code>mgmt_allow.config</code> file, see <a href="secure.htm#ControllingHostAccessTrafficManager">Controlling
Host Access to Traffic Manager</a>. </p>
 <h3>Accessing the Cache Inspector Utility </h3>



Mime
View raw message