Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 1.15 KB

caching-configuration.md

File metadata and controls

37 lines (28 loc) · 1.15 KB

Caching Configuration.

The default configuration provided here does not includes Caching functionality. This can be easily configured here.

Enable Caching Configuration.

First enable the caching in Caching Configuration file. We will need to uncomment the lines those enable the caching.

Create Cache directory..

docker-compose exec -it squid chown -R squid.squid /var/spool/squid

Restart the container.

docker-compose restart

Initial configuration validation.

As this configuration enable the Caching of any contents. We can validate this with curl.

# Check the Caching storage information.
du -sh ./squid-data/cache-dir/

# Download a file, the first time it will take some time.
curl --proxy http://127.0.0.1:3128 SOME_FILE_URL -o SOME_FILE_NAME

# Download the same file again. this time it should get downloaded from Cached contents.
curl --proxy http://127.0.0.1:3128 SOME_FILE_URL -o SOME_FILE_NAME

# Check the Caching storage information.
du -sh ./squid-data/cache-dir/

Purging the Cache.

docker-compose exec -it squid rm -rf /var/spool/squid/*