Using the Fridge

The Fridge is a small proxy web server that can be used to serve static content from a file system folder. You can use the Fridge in two different ways:

Fridge as Cook Proxy

You can configure the Waiter to retrieve content from the Fridge instead of retrieving it from the Cook. In this case, the Fridge needs to contain JSON documents of the kind returned by the Cook.

Fridge as Content Engine Proxy

You can configure the Cook to retrieve content from the Fridge instead of retrieving it from the Content Engine. In this case the Fridge needs to contain Atom documents of the kind returned by Content Engine web services, binary files and so on.

Internally, the Fridge can be configured to operate in two different modes:

  • Offline mode, in which case it only ever looks for resources in its cache folder. If a requested resource cannot be found there, then the Fridge returns an HTTP 404 not found response.

  • Online mode, in which case the Fridge acts as a true proxy: if a requested resource cannot be found in the cache folder, then the Fridge forwards the request to the original server (the Content Engine or Cook). When the original server responds, it does two things: it forwards the response to the caller and it stores the response in its cache folder.

The Fridge can be used for two quite different purposes:

  • Offline template development

  • Caching