1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 best method to rebuild local template cache in filesystem?

Discussion in 'XenForo Questions and Support' started by sross, Mar 18, 2016.

  1. sross

    sross Active Member

    Would it be to disable serving the templates from the filesystem, deleting them all, then re-enabling? Thanks
     
  2. Mike

    Mike XenForo Developer Staff Member

    Disabling and re-enabling the option would be one way. Why do you need to rebuild it?
     
  3. sross

    sross Active Member

    I edited a template and it doesn't seem to be updating..
     
  4. sross

    sross Active Member

    As a test i disabled fetch templates as files, refreshed and the change was there, then re-enabled and the change disappeared. hmm
     
  5. Mike

    Mike XenForo Developer Staff Member

    It sounds like you may have an opcode cache that isn't looking for changes (or is only looking for changes at intervals). This is probably in one of your PHP-related ini files (or php.ini itself).
     
  6. sross

    sross Active Member

    i'll check with my host thanks!
     
  7. sross

    sross Active Member

    Actually this is my xcache entry for my config file. Should I remove the line containing 3600?

    Code:
    $config['cache'] = array(
        'enabled' => true,
        'frontend' => 'Core',
        'frontendOptions' => array(
                'caching' => true,
                'automatic_serialization' => false,
                'cache_id_prefix' => 'you_prefix_',
                'lifetime' => 3600
        ),
        'backend' => 'Xcache',
        'backendOptions' => array(),
        'cacheSessions' => true
    );
     
  8. sross

    sross Active Member

    well to add to this i did rebuild all my forum cache files in the file system and the change has not taken effect, so I have the host looking into my xcache config.
     
  9. MattW

    MattW Well-Known Member

    You should be able the see the Xcache settings in phpinfo via the ACP in the forum. You need to check the cache TTL in there.

    It will look something like this:
    Code:
    xcache.size="256M"
    xcache.slots="8K"
    xcache.test="Off"
    xcache.ttl="0"
    xcache.var_count="2"
    xcache.var_gc_interval="300"
    xcache.var_maxttl="0"
    xcache.var_size="64M"
    xcache.var_slots="8K"
    xcache.var_ttl="0"
    
     
  10. sross

    sross Active Member

    @MattW This is what my host says, can someone advise what I should do here, is the host correct?

     
  11. MattW

    MattW Well-Known Member

    So you have a clash then. Personally, get rid of Xcache, and switch out to ZendOpcache. What version of PHP are you running?
     
  12. sross

    sross Active Member

    php 5.5.33

    so.. get rid of xcache and leave ZendOpcache. What would my config.php settings change to? does the server need any special zendopcache settings configured? Sorry, not too clued up on this. Thanks!!
     
  13. MattW

    MattW Well-Known Member

    You are also caching sessions in Xcache, so you would need to install Memcached on the server as well if you remove Xcache.

    You don't need anything in config.php for ZendOpache to work, as it's just a PHP cache. You would need to edit config.php to suite Memcached if that was to be installed.

    If that's too much work, get them to disable ZendOpache instead, by removing opcache.so from the php.ini file. You won't need to change anything then.
     
  14. sross

    sross Active Member

    Ok, will disable zend for now and see what happens. Thanks again
     
  15. sross

    sross Active Member

    on a side note, here is my current xcache config:

    Code:
    XCache
    XCache Version  3.2.0
    Modules Built  cacher
    
    Directive Local Value Master Value
    xcache.coredump_directory no value no value
    xcache.disable_on_crash Off Off
    xcache.experimental Off Off
    xcache.test Off Off
    
    XCache Cacher
    XCache Cacher Module  enabled
    Readonly Protection  disabled
    Page Request Time  2016-03-19 01:50:02
    Cache Init Time  2016-03-18 05:42:12
    Cache Instance Id  9637
    Opcode Cache  enabled, 268,435,456 bytes, 1 split(s), with 8192 slots each
    Variable Cache  enabled, 268,435,456 bytes, 1 split(s), with 8192 slots each
    Shared Memory Schemes  mmap
    
    Directive Local Value Master Value
    xcache.admin.enable_auth On On
    xcache.allocator bestfit bestfit
    xcache.cacher On On
    xcache.count 1 1
    xcache.gc_interval 0 0
    xcache.mmap_path /dev/zero /dev/zero
    xcache.readonly_protection Off Off
    xcache.shm_scheme mmap mmap
    xcache.size 256M 256M
    xcache.slots 8K 8K
    xcache.stat On On
    xcache.ttl 0 0
    xcache.var_allocator bestfit bestfit
    xcache.var_count 1 1
    xcache.var_gc_interval 300 300
    xcache.var_maxttl 0 0
    xcache.var_namespace no value no value
    xcache.var_namespace_mode 0 0
    xcache.var_size 256M 256M
    xcache.var_slots 8K 8K
    xcache.var_ttl 0 0
     

Share This Page