Skip to content

Cache Resolvers

Edit this page

A number of built-in cache resolvers are available:

When the built-in resolvers do not fit your requirements, you can write your own custom cache resolver.

Configure which Cache Resolver to use

The default cache is the web path cache resolver, which caches images under /media/cache/ within your application web root path.

You can specify the cache resolver to use per individual filter_sets or globally. To change the default cache resolver globally, use:

1
2
3
4
# app/config/config.yml

liip_imagine:
    cache: your_resolver

To change the default configuration, you can redefine the default cache resolver by explicitly defining a resolver called default:

1
2
3
4
5
6
7
# app/config/config.yml

liip_imagine:
    resolvers:
        default:
            web_path:
                cache_prefix: custom_path

To change the cache resolver for a specific filter_set, use the following configuration.

1
2
3
4
5
6
7
8
9
# app/config/config.yml

liip_imagine:
    filter_sets:
        cache: ~
        my_thumb:
            cache: your_resolver
            filters:
                # the filter list
This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.
TOC
    Version