surrogate

package
v1.7.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2024 License: MIT Imports: 2 Imported by: 4

README

Surrogate-Keys system

What is a Surrogate-Key?

A Surrogate-Key allows you to tag a pool of resources and purge them targeting a specific key.
A resource can be tagged by none or multiple surrogate keys and vice-versa.

How to deal with it?

In a HTTP request

The client send to the server an HTTP request which one contains the header Surrogate-Key containing one or multiple keys.
Either the user send the previous request with the PURGE method, it must delete the cache for the associated keys and returns a 204 no-content response.
Either the user send the previous request with the GET method, it must store the resource URL to the provided keys in the header. If one of the keys doesn't already exist, the storage system must add the key in the storage.

In a HTTP response

The client receives an HTTP response which one contains the header Surrogate-Key. It mentions that the resource is associate to the given keys.
With this information, the client can store the keys, and invalidate manually in the future as mentioned in the previous section.

Surrogate-Keys specification for the cache

You can refer to the specification file.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeSurrogate

func InitializeSurrogate(configurationInterface configurationtypes.AbstractConfigurationInterface, storageName string) providers.SurrogateInterface

InitializeSurrogate will initialize the Surrogate-Key storage system

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL