eZ Community » Forums » eZ Platform » how to configure cache by siteaccess
expandshrink

how to configure cache by siteaccess

how to configure cache by siteaccess

Friday 07 April 2017 10:27:00 am - 1 reply

Hello,

I'm struggling to configure ez platform in the following scenario.

I have an adaptive site wich delivers content based on device type, so the same route delivers a content version for mobile devices and another version for desktop and tablet.
To address such requirement I have confirgured two siteaccess, a news and a news_mobile one and a custom matcher based on user agent and a mobile detector library.

Now I wish to configure FOSHttpCache to store a separate cache based on siteaccess; unfortunately the first device making a request forces the cache so that desktop version is shown on mobile devices.

My configuration is as follows:

in config.yml:
stash:
    caches:
        default:
            drivers:
                - FileSystem
            inMemory: true
            registerDoctrineAdapter: false
        mobile:
            drivers:
                - FileSystem
            inMemory: true
            registerDoctrineAdapter: false
    tracking_values: false

in ezplatform.yml:
ezpublish:
    repositories:
        default:
            storage: ~
            search:
                engine: %search_engine%
                connection: default
        list:
            - news_mobile
            - news
            - news_admin
        groups:
            rb_group_mobile:
                - news_mobile
            rb_group:
                - news
                - news_admin
        default_siteaccess: news
    system:
        rb_group_mobile:
            cache_pool_name: '%cache_pool_mobile%'
        rb_group:
            cache_pool_name: '%cache_pool%'
        news_mobile:
            session:
                name: NEWS
            var_dir: var/news
            languages:
                - ita-IT
                - eng-GB
                - ger-DE
                - fre-FR
        news:
            session:
                name: NEWS
            var_dir: var/news
            languages:
                - ita-IT
                - eng-GB
                - ger-DE
                - fre-FR
        news_admin:
            session:
                name: NEWSADMIN
            var_dir: var/news
            languages:
                - ita-IT
                - eng-GB
                - ger-DE
                - fre-FR

Would be anyone so kind either to clarify me how I could configure cache or to tell me where I could find complete documentation?

Saturday 22 April 2017 4:46:09 pm

Hi, look at this

https://doc.ez.no/display/DEVELOPER/HTTP+Cache

section 'Cache and Expiration Configuration'

Modified on Saturday 22 April 2017 4:47:55 pm by Radek Zadroga

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from