Welcome Guest, Not a member yet? Register   Sign In
Note on using the new opcache
#1

If you are using the new opcache in php 7 etc;

You will need to create a file to clear the cache or your development updates will not
work. Everything will be pulled from the cache so when making changes you will need
to run the below file first.

flush_opcache.php

PHP Code:
<?php

opcache_reset
(); 

Place it in the root along with index.php
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#2

(06-26-2019, 03:08 AM)InsiteFX Wrote: If you are using the new opcache in php 7 etc;

You will need to create a file to clear the cache or your development updates will not
work. Everything will be pulled from the cache so when making changes you will need
to run the below file first.

flush_opcache.php

PHP Code:
<?php

opcache_reset
(); 

Place it in the root along with index.php

I think (but have not confirmed) that a couple of php.ini settings will accomplish the same thing.

Code:
opcache.validate_timestamps=1
opcache.revalidate_freq=0

Documentation
Reply
#3

Thanks Dave,

Those seem to work but they would need to be changed for a live server.

Thanks again.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#4

(06-27-2019, 07:47 AM)InsiteFX Wrote: Thanks Dave,

Those seem to work but they would need to be changed for a live server.

Thanks again.

Right, those are the development settings only.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB