Explorar o código

修改hit判定

oott123 %!s(int64=11) %!d(string=hai) anos
pai
achega
9ab9f7c7bd
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      include/controller.php

+ 2 - 1
include/controller.php

@@ -240,7 +240,7 @@ class controller{
 			$request = $purge[1];
 		}
 		$key = (NO_KEY)?$request:md5($request).'_'.strlen($request).'.'.$ext;
-		$this->hit = $key;
+		$this->hit = false;
 		$this->handle($request,$key,$delete,$direct);
 		
 	}
@@ -264,6 +264,7 @@ class controller{
 					$this->locate($url);
 				}
 				$content = $storage->read($key);
+				$this->hit = $key;
 				if(empty($content)){
 					$this->succeed = false;
 					$this->error_type = 'empty_conent';