Are you sure that you purge both Varnish layers (file and RAM)? can you pastebin a varnishlog of the purge and of the subsequent request?
-- Guillaume Quintard On Mon, Dec 9, 2019 at 2:55 AM hamidreza hosseini <[email protected]> wrote: > because its steel in cach and i can download and see th urls that i purged > before! > its Interesting that it return 200 code from varnish!!! > > Best regards. > ------------------------------ > *From:* Guillaume Quintard <[email protected]> > *Sent:* Monday, December 9, 2019 11:48 AM > *To:* hamidreza hosseini <[email protected]> > *Cc:* [email protected] <[email protected]> > *Subject:* Re: Varnish doesnt PURGE urls > > Hi, > > How do you tell that it's not purging? > > Cheers, > > -- > Guillaume Quintard > > > On Mon, Dec 9, 2019 at 2:45 AM hamidreza hosseini <[email protected]> > wrote: > > Hi, > > 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] > > And following file is my vcl configuration file that i'm using, > but when i want to purge a url it doesnt work and it steel remains in > cache, > Should i chage my config file? > What's wrong with varnish? > > Vcl config file: > > ### Naming note: use [0-9a-zA-Z_] only. no -. Or use camelCase ;-) > vcl 4.0; > > import directors; > > > backend varnish_malloc_01 { .host = "192.168.200.12"; .port = "8080"; } > > > sub vcl_init { > new varnish_cluster = directors.round_robin(); > varnish_cluster.add_backend(varnish_malloc_01); > > } > > > acl purge { > "localhost"; > "192.168.200.0"/24; > ; > } > > > sub vcl_recv { > > sub vcl_recv { > #set req.backend_hint = varnish_cluster.backend(); > unset req.http.Cookie; > if (req.method == "PURGE") { > ### TODO: also purge from the backend > if (!client.ip ~ purge) { > return(synth(405,"Not allowed.")); > } > return (purge); > } > } > > sub vcl_backend_response { > set beresp.ttl=48h; > # Don't cache 404 responses > if ( beresp.status == 404 ) { > set beresp.ttl = 120s; > set beresp.uncacheable = true; > return (deliver); > } > } > > > _______________________________________________ > varnish-misc mailing list > [email protected] > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc > >
_______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
