[Koha-devel] Thoughts on reloading Koha plugins

dcook at prosentient.com.au dcook at prosentient.com.au
Thu May 27 02:00:56 CEST 2021


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 <gmc at equinoxoli.org> 
Sent: Thursday, 27 May 2021 3:59 AM
To: David Cook <dcook at prosentient.com.au>
Cc: Arthur <arthur.suzuki at biblibre.com>; koha-devel <koha-devel at lists.koha-community.org>
Subject: Re: [Koha-devel] Thoughts on reloading Koha plugins

 

Hi,

 

On Wed, May 26, 2021 at 1:17 AM <dcook at prosentient.com.au <mailto:dcook at 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
gmc at equinoxOLI.org <mailto:gmc at equinoxOLI.org> 
https://www.equinoxOLI.org 
phone: 877-OPEN-ILS (673-6457)
direct: 770-709-5581

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20210527/6c852cad/attachment.htm>


More information about the Koha-devel mailing list