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

sross

Active member
Would it be to disable serving the templates from the filesystem, deleting them all, then re-enabling? Thanks
 
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).
 
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).
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
);
 
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.
 
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"
 
@MattW This is what my host says, can someone advise what I should do here, is the host correct?

I could see that the two caching mechanisms, zend Opcache and xcache, are enabled in the server. Please see the snippet below:

==
root@host [ipremoved~]# hostname
host.nameremoved
root@host [ipremoved ~]# php -m | fgrep -e apc -e eAccelerator -e OPcache -e XCache
XCache
XCache Cacher
Zend OPcache
XCache Cacher
==

There will be conflicts if two caching mechanisms are enabled. From your updates I infer you need xcache for your websites. Hence let me know if I can disable the zend opcache in the server. Also please provide the website name that you are concerned with so that I can check the issue further.
 
So you have a clash then. Personally, get rid of Xcache, and switch out to ZendOpcache. What version of PHP are you running?

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!!
 
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.
 
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.
Ok, will disable zend for now and see what happens. Thanks again
 
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
 
Back
Top Bottom