Giter Club home page Giter Club logo

nginx-fastcgi-cache's Introduction

=== Nginx Cache ===
Contributors: tillkruess
Donate link: https://github.com/sponsors/tillkruss
Tags: nginx, nginx cache, cache, caching, purge, purge cache, flush, flush cache, server, performance, optimize, speed, load, fastcgi, fastcgi purge, proxy, proxy purge, reverse proxy
Requires at least: 3.1
Tested up to: 5.6
Stable tag: 1.0.5
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Purge the Nginx cache (FastCGI, Proxy, uWSGI) automatically when content changes or manually within WordPress.


== Description ==

Purge the [Nginx](http://nginx.org) cache (FastCGI, Proxy, uWSGI) automatically when content changes or manually within WordPress.

Requirements:

  * The [Filesystem API](http://codex.wordpress.org/Filesystem_API) needs to function without asking for credentials.
  * Nginx and PHP need to run under the same user, or PHP's user needs write access to Nginx's cache path.


== Installation ==

For detailed installation instructions, please read the [standard installation procedure for WordPress plugins](http://codex.wordpress.org/Managing_Plugins#Installing_Plugins).

1. Install and activate plugin.
2. Enter "Cache Zone Path" under _Tools -> Nginx_.
3. Done.


== Screenshots ==

1. Plugin settings page.


== Changelog ==

= 1.0.5 =

  * Added `nginx_cache_zone_purged` action

= 1.0.4 =

  * Improved translatable strings
  * Fixed auto-purge bug
  * Fixed bug when validating directory

= 1.0.3 =

  * Create cache directory if it doesn't exists
  * Re-create cache directory after cache purge
  * Allow post types to be excluded from triggering a cache purge

= 1.0.2 =

  * Fixed 4.6 issue with file-system credentials

= 1.0.1 =

  * Improved testing of file-system credentials

= 1.0 =

  * Initial release

nginx-fastcgi-cache's People

Contributors

a5hleyrich avatar bmts avatar chalda-pnuzig avatar chesio avatar cjne avatar matthewsuan avatar nguyenj avatar nynsen avatar tillkruss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

nginx-fastcgi-cache's Issues

502 Bad Gateway Error

I'm seeing this error PHP Warning: Invalid argument supplied for foreach() in //plugins/Nginx-FastCGI-Cache/nginx-cache.php on line 198

And getting a 502 bad gateway error along with upstream sent too big header while reading response

This is my conf for fastcgi which I thought was related

        fastcgi_buffers 16 16k;
        fastcgi_buffer_size 32k;
        fastcgi_cache_valid 60m;
        proxy_buffer_size   128k;
        proxy_buffers   4 256k;
        proxy_busy_buffers_size   256k;

Any suggestions greatly appreciated.

Filesystem API could not be initialized.

Getting this error Filesystem API could not be initialized.

however i can upload plugins, update core, theme etc without having to supply login credentials so i dont think thats the cause.

I have the path specified as /var/cache/nginx and both have access by www-data user

request_filesystem_credentials during cron

When using wp-cron, events does not always trigger a cache purge i.e save_post. I got an error message saying request_filesystem_credentials is not defined in nginx-cache.php.

Add purge cache option to editors as well

Is there any way for me to edit the plugin files such that I can add the purge option to the wordpress admin bar node for site editors (or people with a specific role) as well. At present only admins are able to access it if I'm not wrong.

Better Multisite options

@tillkruss Thanks for this great plugin.

More of a Feature request than an issue.

Do you have plans to make this plugin more multiple network friendly? Mainly moving the setup to the Network admin (Setting would be a good place) instead of individual sites (tools)?

Again, Thanks for the great plugin

nginx_cache_purge_actions filter is applied too early

Hi,

I'm trying to use nginx_cache_purge_actions filter to register additional actions that should flush Nginx cache, but I noticed that this filter is applied right when plugin is loaded, so there's no way how to use this filter from (child) theme.

I understand this filter should be applied early, so one can register actions that are invoked early, but I would say running this filter in after_setup_theme hook should be early enough and would allow to use the filter from within themes.

If you're fine with my suggestion, I can make a pull request.

Define WP_CACHE

The plugin works super perfectly, so first thank you for making it! I use WP-PostViews plugin to count post views and it can use Ajax to count views on cached pages, however it uses Ajax only if the WP_CACHE is defined. In short, if it acknowledges that you're "using" a caching plugin, it uses Ajax to count the views. You can see another user noticed this: https://wordpress.org/support/topic/server-side-cache-not-working/

There may be other plugins that check for WP_CACHE, do you think it would be a good addition to somehow set WP_CACHE to true when the plugin is loaded?

Disable flushing checkbox isn't working.

"Automatically flush the cache when content changes" checkbox isn't working.

I installed, activated, and set 'Cache Zone Path' plugin setting. Opened a given page in chrome incognito, then updated such page in wp-admin, then reloaded such page in chrome incognito. A MISS ocurred.

So the plugin is emptying the cache, just regardless of that setting.


Home URL: ***
Site URL: ***
WC Version: 3.2.6
Log Directory Writable: ✔
WP Version: 4.9.1
WP Multisite: –
WP Memory Limit: 256 MB
WP Debug Mode: –
WP Cron: ✔
Language: es_MX

### Server Environment ###

Server Info: nginx/1.13.3
PHP Version: 7.1.13-1+ubuntu16.04.1+deb.sury.org+1
PHP Post Max Size: 8 MB
PHP Time Limit: 30
PHP Max Input Vars: 1000
cURL Version: 7.47.0
OpenSSL/1.0.2g

...

WordPress 4.6 - request_filesystem_credentials issue

Whenever I do anything in my site, like add a post I get redirected to a whitescreen asking for FTP credentials.

This only happens in 4.6, possibly related to
https://core.trac.wordpress.org/changeset/38138 or https://core.trac.wordpress.org/changeset/38167

Error log output:

2016/08/31 17:41:18 [error] 21551#21551: *174 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function submit_button() in /home/user/mysite.com/public/htdocs/wp/wp-admin/includes/file.php:1263
Stack trace:
#0 /home/user/mysite.com/public/htdocs/wp-content/plugins/nginx-cache/nginx-cache.php(258): request_filesystem_credentials('', 'ftpext', false, '/home/user/mysi...', Array, true)
#1 /home/user/mysite.com/public/htdocs/wp-content/plugins/nginx-cache/nginx-cache.php(169): NginxCache->initialize_filesystem()
#2 /home/user/mysite.com/public/htdocs/wp-content/plugins/nginx-cache/nginx-cache.php(232): NginxCache->is_valid_path()
#3 /home/user/mysite.com/public/htdocs/wp-content/plugins/nginx-cache/nginx-cache.php(221): NginxCache->purge_zone()
#4 /home/user/mysite.com/public/htdocs/wp/wp-includes/plugin.php(524): NginxCache->purge_zone_once(409546)
#5 /home/user/mysite.com/public/htdocs/wp/wp-includes/post.php(5594): do_action('clean_post_cach...', 409546, Object(WP_Po" while reading response header from upstream, client: 86.165.9.62, server: mysite.com, request: "GET /?file=0&did=408478&vp_edd_act=download&expire=MTQ3Mjc0Nzg2NA%3D%3D HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "mysite.com"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.