trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
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

Added "Removing Object From Cache" section


Modified: incubator/trafficserver/site/trunk/docs/admin/cache.htm
--- 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
 <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>
 <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>
 <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>
@@ -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>
+<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></code></u>
and you want to remove the image <code>remove_me.jpg</code> from cache:</p>
+<p><code>$ curl -X PURGE -v ""</code></p>
+<p><code>* About to connect() to port 80 (#0) <br /> 
+  * Trying connected <br />
+  * Connected to ( 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:   <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
+<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>

View raw message