Skip to content

This module not working as expected #67

@kigajewex

Description

@kigajewex

I'm not saying wasting of time on it but it just not working as expected, so i build my own purge, kinda fast just in few minutes

proxy_cache_path /var/nginx_cache levels=1:2 keys_zone=my_cache:20m max_size=200m inactive=2h;
proxy_cache_key $uri;
server {
	server_name purge;
	root /var/www/purge;
	index target.php
	listen 80;
	location / {
		try_files $uri $uri/ target.php;
	}
	location ~ \.php$ {
		include snippets/fastcgi-php.conf;
		fastcgi_pass 127.0.0.1:9000;
	}
}
<?php
if(!isset($_POST['uri'])){
	die('no uri');
}
$uri = $_POST['uri'];
$md5 = md5($uri);
$parent = substr($md5, -1);
$sub = rtrim(substr($md5, -3), $parent);
if(@unlink('/var/nginx_cache/'.$parent.'/'.$sub.'/'.$md5)){
	echo 1;
}else{
	echo 0;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions