I've two varnish, that one of them use ram as backend and another file as backend, requests first come to varnish(ram) and then go to another server in varnish(file) and then go to nginx, this is my diagram:
Req=====> [varnish ram] =======> [varnish file] =====> [Nginx]
Now i want to just purge a url in varnish ram for once and varnish ram automatically purge that url in varnish file,
Actually, i want to remove a file in varnish ram with purge and automatically that file or url will become remove in varnish file
How can i do this?
This not possible with the open source version.
You will need the broadcaster by Varnish-Software: https://docs.varnish-software.com/varnish-broadcaster/usage/
Related
My nginx server is running with pagespeed but every day I have some problems with cache. The problem is that after some time the scripts loaded in my site returns 404 error. When i look into the cache directory I find a new file named !clean!time!, I supose, like the name suggest, that the cache need to be cleaned. After manual clean and restart server all comes to work. Some one can explain me this behavior? Can I set an "auto-clean cache" on nginx configuration? Thanks
I just had my server people install APC to try to decrease the amount of memory that my server uses per person.
I went into my local.xml and entered in the following within the Global mark.
<cache>
<backend>apc</backend>
<slow_backend>database</slow_backend>
<prefix>MYSTORE_</prefix>
</cache>
</global>
I then reset apache.
Then in my php.ini file I have the following:
;APC SETTINGS
apc.enabled=1
apc.shm_size=512M
apc.num_files_hint=10000
apc.user_entries_hint=10000
apc.max_file_size=10M
apc.stat=0
apc.optimization=0
apc.shm_segments=1
apc.enable_cli=1
apc.cache_by_default=1
apc.include_once_override=1
I was able to increase the size and actually enter in these settings buy updating the master php.ini on my server (rather than the local one).
However, when I go into system cached entires it only shows hidden/apc.php and on the dashboard it only shows the 1 file.
Can you guys please help me figure this out? I'm running magento 1.9.1, PHP 5.4.35, APC 3.1.13, Apache 2.2.29.
Thanks!
You're missing
extension=apc.so
Also APC is at the server/php level. The cache block in the XML is to configure higher level caching systems such as Redis.
I have an NGINX server set-up to handle caching for a website (running elsewhere).
Works like a charm, however we want to administrators to have an option to flush the cache from their backoffice. I was thinking of handling this using FTP, by simply removing all the files from the cache directory.
I have set up the caching like this:
proxy_cache_path /var/cache/nginx/my_site levels=1:2 keys_zone=MY_SITE:8m max_size=2048m inactive=720m;
However the files are stored with permissions 700. How can I tell NGINX to also give permissions to the group (770)? I would add the FTP user I created to that group then.
Any other suggestion to handle the flushing would be OK (I heave read the other thread). The backoffice is located on another location so I would have to use some remote technology.
You could use proxy_cache_purge directive, look for details http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_purge (this directive apeared in 1.5.7)
I have a modular Sinatra app running on nginx with Phusion Passenger. When I alter my app (and in particular, some YAML files which are used to generate pages), I'd like to be able to clear only the parts of my cache that are affected (and leave evertyhing else in /public alone--I know I can just clean out the whole cache, but I was hoping not to).
Thanks!
you could:
set up 2 cachezone's in nginx with 2 proxy_cache_path directive in your ninx http block
(see http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_path for specifics)
then refer to the defined zone-names in proxy_cache directives in your location blocks
you can then clear just the cache for the yaml-generated stuff
I've been running on a problem for about two weeks.
I Have a magento which is configured to use a memcache server.
Recently, I got to change the server storing my magento application.
I installed my new server, and just get my magento app up and running on the new server, with one change : I changed the database user and password used to connect to the database server.
I changed from userold to usernew.
This change takes place in my local.xml file.
But now, when I active the magento cache, Magento tries to connect to my database with the old username : userold.
I've tried all things :
rm -fR var/
/etc/init.d/memcache restart
killall memcached
reboot the entire server running memcached!
I still have my cache problem ! I can't get my
Where does this "userold" value is fuc*** stored ?
Any help would really be appreciated ! :)
Hugues.
telnet into the memcache instance and issue a flush_all command. Restarting the memcache server should have already flushed it, but sometimes its worth a try...
Magento uses TwoLevels backend for caching.
Cache stores to both of them.
And according to Zend's code, Magento reads from fast, and then from slow, if nothing returns.
You have to flush memcache and remove /var/cache at the same time.
start a new instance of memcache on a new port eg 11212
now specify this new port in local.xml
that should ensure that it is talking to a new instacne not the old.. or
use htop / top find find the psid of memcache and kill xxxx