Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Squid Cache

    Scheduled Pinned Locked Moved pfSense Packages
    7 Posts 2 Posters 2.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      M 0
      last edited by

      I'm looking to get creative with a Squid Cache deployment. I'm hoping you can help me get this project off the ground.

      I'd like to configure Squid to keeps it's own cache updated once popular content becomes stale. For example, instead of waiting for a user to request a popular page before Squid checkes its validity, Squid would update its cache once it becomes stale. The goal is about maximizing end user performance when visiting popular web content. Any thoughts?

      1 Reply Last reply Reply Quote 0
      • N
        Nachtfalke
        last edited by

        Use the "refresh_pattern" offered in the squid wiki. Search the forum on how to cache windows updates or something like that. The same can be done with other content. You just have to use the correct regex and the correct refresh_pattern.

        Perhaps you have to describe more in detail what you want to realize.

        1 Reply Last reply Reply Quote 0
        • M
          M 0
          last edited by

          I have multiple WAN links with varying levels of SLAs, bandwidth, and latency.

          All critical traffic (business applications, security cams, and phones) leaves the network on a slower connection (3Mbps/3Mbps) with next to no latency. QoS is well established. All commodity (non-critical) traffic leaves on a high bandwidth, high latency connection. The goal is to implement a caching server to address latency issues and to make the web 'feel' faster on websites that have a clear caching policy.

          So Squid would be configured to:

          1. Only cache websites with a clear caching policy
          2. Revalidate when an object expires, even before the client has requested the object
          3. If an object has not been requested in X days, wait until a client requests the object before revalidating
          1 Reply Last reply Reply Quote 0
          • M
            M 0
            last edited by

            @M:

            So Squid would be configured to:

            1. Only cache websites with a clear caching policy
            2. Revalidate when an object expires, even before the client has requested the object
            3. If an object has not been requested in X days, wait until a client requests the object before revalidating

            An example, if an object on a website is set to expire ever hour. Squid would revalidate the object, and cache if necessary, upon the expiration even before a client requests the object. In this way, Squid will always have a copy of the object ready to serve.

            1 Reply Last reply Reply Quote 0
            • N
              Nachtfalke
              last edited by

              this for squid2
              http://www.squid-cache.org/Versions/v2/2.7/cfgman/refresh_pattern.html

              this for squid3
              http://www.squid-cache.org/Versions/v3/3.1/cfgman/refresh_pattern.html

              this as overview
              http://www.squid-cache.org/Doc/config/refresh_pattern/

              override-expire and ignore-must-revalidate would probably what you are searching for.

              Or perhaps this:
              http://www.squid-cache.org/Doc/config/offline_mode/

              1 Reply Last reply Reply Quote 0
              • M
                M 0
                last edited by

                @Nachtfalke:

                override-expire and ignore-must-revalidate would probably what you are searching for.

                Or perhaps this:
                http://www.squid-cache.org/Doc/config/offline_mode/

                Actually, these are not what I am looking for. I only want to cache objects that the server sends with an explicit expiry time. I DO NOT want to break the HTTP standards.

                Please correct me if I am wrong. By default, Squid waits to validate a cached object until one of its clients attempt to access the cached object. I don't wait to wait until a client attempts to access the object. When an object expires, Squid should revalidate and then download if necessary.

                1 Reply Last reply Reply Quote 0
                • M
                  M 0
                  last edited by

                  I have settled on Squid3 as an optional proxy on our net. The results are promising but I'm stumped on the configuration. I'd like the Squid cache to revalidate when an object expires without waiting for a client to requested the expired object. Does anyone have a thought about how I can accomplish this?

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.