Test
This commit is contained in:
parent
c41207be87
commit
ac515118f5
1 changed files with 5 additions and 5 deletions
|
@ -49,11 +49,9 @@ class PublicController extends BaseController
|
||||||
}
|
}
|
||||||
$size = $this->size[$sizeName];
|
$size = $this->size[$sizeName];
|
||||||
|
|
||||||
$image = Image::query()->where("id", "=", $image);
|
$image = Image::query()->where("id", "=", $image)->firstOrFail();
|
||||||
$gallery = Gallery::query()->where("id", "=", $gallery);
|
$gallery = Gallery::query()->where("id", "=", $gallery)->firstOrFail();
|
||||||
$tenant = Tenant::query()->where("id", "=", $tenant);
|
$tenant = Tenant::query()->where("id", "=", $tenant)->firstOrFail();
|
||||||
$cacheName = "cache/".$tenant->url."_".$gallery->url."_".$image->id;
|
|
||||||
|
|
||||||
if($gallery != $gallery->url) {
|
if($gallery != $gallery->url) {
|
||||||
abort(404, "Gallery not match");
|
abort(404, "Gallery not match");
|
||||||
}
|
}
|
||||||
|
@ -62,6 +60,8 @@ class PublicController extends BaseController
|
||||||
abort(404, "Tenant not match");
|
abort(404, "Tenant not match");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$cacheName = "cache/".$tenant->url."_".$gallery->url."_".$image->id;
|
||||||
|
|
||||||
//Check if exsits in cache and return from it
|
//Check if exsits in cache and return from it
|
||||||
$r = $this->tryReturnFromCache($cacheName."_".$size, $tenant->id, $gallery->id, $image->id);
|
$r = $this->tryReturnFromCache($cacheName."_".$size, $tenant->id, $gallery->id, $image->id);
|
||||||
if($r != null) {
|
if($r != null) {
|
||||||
|
|
Loading…
Reference in a new issue