mirror of
https://github.com/standardebooks/web.git
synced 2025-07-12 17:42:29 -04:00
Change the way we deploy ebooks from destroying the entire apcu cache and rebuilding on the next web request, to rebuilding in the background
This commit is contained in:
parent
d56cb360cc
commit
bd4dd7baa2
6 changed files with 192 additions and 157 deletions
|
@ -25,6 +25,6 @@ fi
|
|||
# If this script is run by a user without sudo powers, they can be given for this command by creating a file in sudoers.d with:
|
||||
# MY_USERNAME ALL=(www-data) NOPASSWD: /usr/bin/env SCRIPT_FILENAME=/tmp/php-fpm-opcache-reset.php REQUEST_METHOD=GET cgi-fcgi -bind -connect *
|
||||
|
||||
echo '<?php opcache_reset(); if(function_exists("apcu_clear_cache")){ apcu_clear_cache(); } ?>' > /tmp/php-fpm-opcache-reset.php
|
||||
echo '<?php opcache_reset();?>' > /tmp/php-fpm-opcache-reset.php
|
||||
sudo -u www-data env SCRIPT_FILENAME=/tmp/php-fpm-opcache-reset.php REQUEST_METHOD=GET cgi-fcgi -bind -connect "/run/php/$1.sock" &> /dev/null
|
||||
rm /tmp/php-fpm-opcache-reset.php
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue