That’s interesting, Galen. 

 

If I recall correctly, loading libraries in PHP doesn’t load them into PHP per 
se but rather inserts the code into the PHP script itself. I suppose in that 
way maybe you could cache and invalidate individual scripts and not have to 
worry about “unloading modules”. I don’t think we have any equivalent in Perl 
though, unfortunately.

 

With Plack, we have Plack::App::CGIBin, which caches CGI scripts by turning 
them into packages, but everything is living in that Starman worker process. 

 

I have to go into a meeting but more thinking to do here…

 

David Cook

Software Engineer

Prosentient Systems

Suite 7.03

6a Glen St

Milsons Point NSW 2061

Australia

 

Office: 02 9212 0899

Online: 02 8005 0595

 

From: Galen Charlton <g...@equinoxoli.org> 
Sent: Thursday, 27 May 2021 3:59 AM
To: David Cook <dc...@prosentient.com.au>
Cc: Arthur <arthur.suz...@biblibre.com>; koha-devel 
<koha-devel@lists.koha-community.org>
Subject: Re: [Koha-devel] Thoughts on reloading Koha plugins

 

Hi,

 

On Wed, May 26, 2021 at 1:17 AM <dc...@prosentient.com.au 
<mailto:dc...@prosentient.com.au> > wrote:

Hmm interesting. I see instructions on setting up Wordpress with FastCGI but no 
comments about any impact that would have on plugins. Maybe they just don’t 
worry about it the same way most Koha folk don’t worry about it hehe.

 

As I recall, Zend Opcache has various settings to control if and when it will 
recompile the PHP scripts in caches. Depending on what settings you choose, in 
a FastCGI environment it can periodically check to see if a script has been 
updated and update the cache if need be - or, if you choose, never revalidate 
the cache, in which case you'd need to reload or restart php-fpm after changing 
code.

 

Also, WordPress has code that tries to clear opcache. [1, 2]

 

[1] https://developer.wordpress.org/reference/functions/wp_opcache_invalidate/

[2] https://core.trac.wordpress.org/ticket/36455

 

Regards,

 

Galen

-- 

Galen Charlton
Implementation and IT Manager
Equinox Open Library Initiative
g...@equinoxoli.org <mailto:g...@equinoxoli.org> 
https://www.equinoxOLI.org 
phone: 877-OPEN-ILS (673-6457)
direct: 770-709-5581

_______________________________________________
Koha-devel mailing list
Koha-devel@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : https://www.koha-community.org/
git : https://git.koha-community.org/
bugs : https://bugs.koha-community.org/

Reply via email to