create-prisma-php-app 4.1.1 → 4.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bootstrap.php +9 -3
- package/package.json +1 -1
package/dist/bootstrap.php
CHANGED
|
@@ -1192,8 +1192,11 @@ try {
|
|
|
1192
1192
|
}
|
|
1193
1193
|
|
|
1194
1194
|
if ((!Request::$isWire && !Bootstrap::$secondRequestC69CD) && isset(Bootstrap::$requestFilesData[Request::$decodedUri])) {
|
|
1195
|
-
|
|
1196
|
-
CacheHandler
|
|
1195
|
+
$shouldCache = CacheHandler::$isCacheable === true
|
|
1196
|
+
|| (CacheHandler::$isCacheable === null && $_ENV['CACHE_ENABLED'] === 'true');
|
|
1197
|
+
|
|
1198
|
+
if ($shouldCache) {
|
|
1199
|
+
CacheHandler::serveCache(Request::$decodedUri, intval($_ENV['CACHE_TTL'] ?? 600));
|
|
1197
1200
|
}
|
|
1198
1201
|
}
|
|
1199
1202
|
|
|
@@ -1212,7 +1215,10 @@ try {
|
|
|
1212
1215
|
MainLayout::$html = "<!DOCTYPE html>\n" . MainLayout::$html;
|
|
1213
1216
|
|
|
1214
1217
|
if (
|
|
1215
|
-
http_response_code() === 200
|
|
1218
|
+
http_response_code() === 200
|
|
1219
|
+
&& isset(Bootstrap::$requestFilesData[Request::$decodedUri]['fileName'])
|
|
1220
|
+
&& $shouldCache
|
|
1221
|
+
&& (!Request::$isWire && !Bootstrap::$secondRequestC69CD)
|
|
1216
1222
|
) {
|
|
1217
1223
|
CacheHandler::saveCache(Request::$decodedUri, MainLayout::$html);
|
|
1218
1224
|
}
|