Technology Networking & Internet

How to Clear a Proxy Server

    • 1). Log in to the computer running the proxy server as the proxy administrator user.

    • 2). Shut down the proxy server. The specific way of performing this step depends on the proxy and on the operating system. For example, for Squid, a popular proxy server, running on Windows, click "Start," type "run" into the search box and click the "Run" link. Type "cmd" into the text field and press "Enter." Type the following command into the newly opened Command window:

      squid -k shutdown

      Press "Enter."

    • 3). Determine if the proxy was caching objects on disk or only in main memory. For example, for Squid on Windows, edit the configuration file -- "C:\squid\squid.conf" by default -- and make sure that the following directive is present in the file:

      cache_dir "c:\squidCache"

      In this example, "c:\squidCache" is the path to the cache directory. Make a note of all directories you find listed as parameters to "cache_dir" directives. If there are no "cache_dir" directives, your proxy is configured to cache objects exclusively in main memory. Exit the text editor without modifying the configuration file.

    • 4). Rename a cache directory found in Step 3 by typing the following command into the Command window:

      ren "c:\squidCache" "c:\squidCache.OLD"

      Replace "c:\squidCache" by the name of a cache directory obtained in Step 3. Press "Enter."

    • 5). Repeat Step 4 for all other directories found in Step 3.

    • 6). Restart the proxy with a clean cache. For example, for Squid on Windows, type the following commands:

      squid -z

      squid

      Press "Enter" after each line.

    • 7). Free up the disk space used by the old cache contents by clicking "Start," then "Computer." Select each of the directories renamed in Step 4 by clicking once on it, then pressing "Delete."

Leave a reply