# You must use a tab-size of 4 spaces to edit this file.
---
site_settings:
    setting_group: optimisation
    tabs:
        caching:
            fields:
                caching_enabled:
                    site_setting:
                        name: caching_enabled
                    label: 'Cache web pages and other text-files generated by PHP (recommended)'
                    type: checkbox
                    value: 1
                    redraw_onchange: true
                    note_below: |
                        Allows text-files generated by PHP (e.g. web pages, JavaScript bundles)
                        to be saved to disk in the <code>cache/</code> directory,
                        then later served up from the disk without needing to generate the file again.
                
                cache_web_pages:
                    site_setting:
                        name: cache_web_pages
                    label: 'Cache web pages and plugins (recommended)'
                    type: checkbox
                    value: 1
                    redraw_onchange: true
                    visible_if: |
                        zenarioAB.value('caching_enabled')
                    indent: 1
                    side_note: |
                        Allows a page to be saved to disk.
                        Page caching provides a greater speedup than plugin caching, but is only possible on pages
                        where every plugin on the page allows itself to be cached.
                        <br/><br/>
                        Where not every plugin on the page allows itself to be cached, individual plugins
                        that can will be saved to disk instead.
                caching_debug_info:
                    site_setting:
                        name: caching_debug_info
                    label: 'Show caching debug info'
                    type: checkbox
                    visible_if: |
                        zenarioAB.value('caching_enabled') &&
                        zenario.engToBoolean(zenarioAB.value('cache_web_pages'))
                    indent: 2
                    redraw_onchange: true
                    side_note: |
                        This allows you to click on a button at the bottom right of each page in visitor mode
                        to see debug information on caching.
                        
                        <br/><br/>
                        
                        Look out for one of these icons:
                        <br/>
                        <span class="zenario_cache_info_icon_example zenario_cache_disabled"></span>
                        <span class="zenario_cache_info_icon_example zenario_cache_blocked"></span>
                        <span class="zenario_cache_info_icon_example zenario_from_cache"></span>
                        <span class="zenario_cache_info_icon_example zenario_cache_in_use"></span>
                        <span class="zenario_cache_info_icon_example zenario_not_cached"></span>
                        
                        <br/><br/>
                        
                        To see this, you will need to log out of admin mode.
                        (Tip: to save time, use an incognito window instead.)
                caching_email_on_clear:
                    site_setting:
                        name: caching_email_on_clear
                    label: 'Send an email to the support email address whenever the cache is cleared'
                    type: checkbox
                    visible_if: |
                        zenarioAB.value('caching_enabled') &&
                        zenario.engToBoolean(zenarioAB.value('cache_web_pages'))
                    indent: 2
                    note_below: |
                        Only recommended for debugging problems with the cache.
                cache_bundles:
                    site_setting:
                        name: cache_bundles
                    label: 'Cache CSS and JavaScript file bundles (recommended)'
                    type: checkbox
                    value: 1
                    visible_if: |
                        zenarioAB.value('caching_enabled')
                    indent: 1
                    side_note: |
                        Allows CSS and JavaScript file bundles to be saved to disk.
                        This won't affect your skin files if you have &quot;CSS File Bundles&quot; turned off.
                
                    
                
        zenario_pro_features__cache_stats:
            ord: 1.01
            priv: _PRIV_EDIT_SITE_SETTING
            label: Cache Stats
            visible_if: |
                zenario.engToBoolean(zenarioAB.value('caching_enabled', 'caching'))
            edit_mode:
                enabled: true
                priv: _PRIV_EDIT_SITE_SETTING
                on: true
            notices:
                notice:
                    type: success
                    message: The statistics have been reset.
                    show: false
            fields:
                description:
                    full_width: true
                    snippet:
                        html: |
                            <p>
                                This tab shows you how this site is using the cache.
                            </p><p>
                                Sites that frequently change will have a lower percentage of hits than sites that are static.
                                Sites that use lots of user customisation
                                (such as GeoIP, &quot;Welcome&quot; messages for logged in extranet users or private menu nodes)
                                will have a lower percentage of hits than sites without an extranet.
                            </p>
                total:
                    label: 'Total:'
                    type: text
                    readonly: true
                    value: ""
                    style: 'width: 10em;'
                    note_below: The total number of pages requested.
                hits:
                    label: 'Hits:'
                    type: text
                    readonly: true
                    value: ""
                    style: 'width: 10em;'
                    note_below: The number of pages served from the cache.
                hits_pc:
                    label: 'Hit Percentage:'
                    type: text
                    readonly: true
                    value: ""
                    style: 'width: 6em;'
                    post_field_html: %
                writes:
                    label: 'Writes:'
                    type: text
                    readonly: true
                    value: ""
                    style: 'width: 10em;'
                    note_below: The number of pages written to the cache.
                partial_hits:
                    label: 'Partial Hits:'
                    type: text
                    readonly: true
                    value: ""
                    style: 'width: 10em;'
                partial_writes:
                    label: 'Partial Writes:'
                    type: text
                    readonly: true
                    value: ""
                    style: 'width: 10em;'
                    note_below: >
                        Partial hits and writes are where a page could not be
                        cached, but some of the plugins on the page were cached.
                misses:
                    label: 'Misses:'
                    type: text
                    readonly: true
                    value: ""
                    style: 'width: 10em;'
                    note_below: >
                        The number of requested pages that did not make use of the
                        cache.
                from:
                    label: 'From:'
                    type: datetime
                    readonly: true
                    value: ""
                to:
                    label: 'To:'
                    type: datetime
                    readonly: true
                    value: ""
                    note_below: The date range that these statistics have been recorded in.
                refresh_stats:
                    full_width: false
                    value: Refresh Stats
                    class: zenario_gp_button
                    type: submit
                clear_stats:
                    full_width: false
                    value: Reset Stats
                    class: zenario_submit_button
                    type: toggle
                    format_onchange: true
