Giter Club home page Giter Club logo

ezplatform-http-cache's Introduction

Build Status Downloads Latest release License

platform-http-cache

Provides HTTP cache handling for eZ Platform, by default since version 1.12. From ezpublish-kernel, it adds support for mult-tagging for Symfony Proxy, Varnish (using xkey). Support for Fastly is part of the eZ Platform Cloud Enterprise offer as of 1.13 LTS.

Usage with Varnish

For usage with Varnish see the dedicated document in docs/varnish

Features

xkey header on ContentView responses

Responses from /content/view will be tagged based on their contents:

curl -i -X HEAD 'http://localhost:8000/'

HTTP/1.1 200 OK
Host: localhost:8000
Connection: close
Cache-Control: public, s-maxage=60
Content-Type: text/html; charset=UTF-8
Vary: X-User-Hash
xkey: content-1 content-type-1 location-2 parent-1 path-1 path-2 ez-all

As of v0.7, if you have several repositories configured, the tags will be prefixed by repository name on non default repository. E.g. "intranet_path-1".

For further reading on tags see docs/using_tags.md.

Toggling of cache on ContentView responses

Responses from /content/view will be made cachable, and the shared max age will be set if it is enabled.

Purging of tagged HTTP cache on Repository operations

A set of Slots will send HTTP PURGE requests for each cache tag affected by write operations.

Configuration

Drivers

This bundle lets you configure drivers for handling HTTP cache. The following exists from eZ:

  • local: extended Symfony Proxy to support tagging and varying by user rights (available in this bundle)
  • http aka varnish: Varnish proxy using and customizing FosHttpCache for purging (available in this bundle)
  • fastly: Fastly CDN proxy (available with eZ Platform Enterprise and documented separately)

Configuring these is done using global ezpublish.http_cache.purge_type config. By default it is set to use %purge_type% parameter, and can be set in app/config/parameters.yml like so:

parameters:
    purge_type: varnish

For further reading on drivers see docs/drivers.md.

Tags

For further reading on tags see docs/using_tags.md.

ezplatform-http-cache's People

Contributors

adamwojs avatar alongosz avatar andrerom avatar bdunogier avatar blankse avatar damianz5 avatar emodric avatar glye avatar kmadejski avatar marioblazek avatar mnocon avatar nattfarinn avatar pawbuj avatar plopix avatar vidarl avatar vinitou avatar volkanakb avatar wizhippo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.