# You must use a tab-size of 4 spaces to edit this file.
---
site_settings:
    setting_group: optimisation
    title: Editing Zenario cache settings
    tabs:
        caching:
            label: Caching and bundling files
            edit_mode:
                enabled: true
                priv: _PRIV_EDIT_SITE_SETTING
                on: false
            
            fields:
                description:
                    full_width: true
                    snippet:
                        html: |
                            This tab contains settings for caching the output of Zenario into static files,
                            to reduce server on your server and make web pages load more quickly.
                            
                            Visitors' browsers may cache files, even if Zenario's caching in disabled.
                            You may prevent this by enabling developer mode,
                            or by pressing the &quot;Clear cache and check for changes&quot; button.
                        
                cache_images:
                    label: 'Cache images'
                    type: checkbox
                    readonly: true
                    note_below: ''
                
                bundle_skins:
                    ord: 997
                    site_setting:
                        name: bundle_skins
                        value: visitors_only
                    label: |
                            Bundle skin CSS files:
                    type: select
                    values:
                        on:
                            label: Always bundle files
                        visitors_only:
                            label: Bundle files for visitors only, not admins (recommended)
                        off:
                            label: Always serve files separately
                    value: on
                    note_below: |
                        Zenario can bundle the multiple CSS files of a skin together into a single download.
                        Having less individual files to download means less network connections in the browser
                        and should make the website load faster,
                        but we recommend turning this off while working on CSS for easier debugging.
                        <br/>
                        <em style="font-style: italic;">
                            Core files for Zenario will always be bundled, and this cannot be disabled.
                        </em>
                
                bundle_js:
                    ord: 998
                    label: |
                        Bundle plugin JavaScript files:
                    type: select
                    values:
                        on:
                            label: Always bundle files
                    value: on
                    readonly: true
                    note_below: |
                        Zenario bundles multiple JavaScript files of plugins on a page into a single download.
                        Having less individual files to download means less network connections in the browser
                        and should make the website load faster.
                        This cannot be disabled.
                        <br/>
                        <em style="font-style: italic;">
                            Core files for Zenario will always be bundled, and this also cannot be disabled.
                        </em>
                
                defer_js:
                    site_setting:
                        name: defer_js
                    ord: 999
                    label: 'Defer JavaScript in visitor mode (recommended)'
                    type: checkbox
                    value: 1
                    note_below: |
                        Deferring JavaScript will make your pages load more quickly, and is recommended.
                        <br/>
                        If you add JavaScript from a third-party to the site, and find it is not working, it may help to turn this setting off.
                        
        
        clear_cache:
            priv: _PRIV_EDIT_SITE_SETTING
            label: Clear the cache
            edit_mode:
                enabled: true
                priv: _PRIV_EDIT_SITE_SETTING
                on: true
            notices:
                notice:
                    type: success
                    message: The cache has been cleared.
                    show: false
            fields:
                description:
                    full_width: true
                    snippet:
                        html: |
                            <p>
                                Any change that could potentially affect your whole site
                                (e.g. changes to plugin settings, site settings, layouts or phrases)
                                will trigger the deletion of every cached web page and plugin
                                from the <code>cache/</code> directory.
                            </p><p>
                                Any change that affects only a specific content item
                                (such as publishing a draft, hiding or trashing a published page)
                                will only trigger the deletion of related files.
                            </p><p>
                                Any change that does not relate to the contents of a page
                                (e.g. a change to an administrator, email template or newsletter) will not
                                delete any web page or plugin from the <code>cache/</code> directory.
                            </p><p>
                                Any changes made to a module's PHP code or frameworks
                                will also trigger the deletion of every cached web page and plugin
                                from the <code>cache/</code> directory,
                                however the check for this slows down your site, so is only performed
                                when the site is in developer mode and is viewed by an administrator.
                            </p><p>
                                If you wish to manually clear the cache you may do so by pressing this button.
                            </p>
                clear_cache:
                    full_width: false
                    type: submit
                    value: 'Clear cache and check for changes'
                    class: zenario_submit_button
                    format_onchange: true
                    note_below: |
                        <p>This button will:</p>
                        <ul>
                            <li>Clear the <code>cache/</code> directory of all cached web pages, plugins, <code>.css</code>, <code>.js</code> and <code>.yaml</code> files (they will be freshly re-created on visitor demand)</li>
                            <li>Re-create the minified copies of skins in the <code>public/css/</code> directory</li>
                            <li>Cause visitors' browser caches to be cleared on next load.</li>
                        </ul>
                        <p>This button will also, where applicable, restart any running background scripts managed by the Scheduled Task Manager, and cause any reverse proxy cache's data to be cleared.</p>
        
        speed:
            label: Server settings
            edit_mode:
                enabled: true
                priv: _PRIV_EDIT_SITE_SETTING
            fields:
                description:
                    full_width: true
                    snippet:
                        html: >
                            This tab contains settings that you change on the server to make your web pages load
                            more quickly for visitors.
                zenario_siteconfig: 
                    type: grouping
                    name: zenario_siteconfig
                compress_web_pages:
                    grouping: zenario_siteconfig
                    label: Compression enabled
                    type: checkbox
                    value: "1"
                    note_below: |
                        Compress files to reduce bandwidth and download times, if a visitor's browser supports compression.
                have_query_cache:
                    grouping: zenario_siteconfig
                    label: 'Caching of SQL queries enabled'
                    type: checkbox
                    readonly: true
                    note_below: |
                        Enabling the query cache in MySQL will speed up Zenario when repeated queries are made to the database,
                        resulting in faster page-generation times and less load on the server.
                        This feature can be enabled by your server administrator.
                query_cache_size:
                    grouping: zenario_siteconfig
                    label: 'Query cache size'
                    type: text
                    style: 'width: 6em;'
                    readonly: true
