Skip to content

Commit 22233b9

Browse files
fix: exclude model's with parents from caching
1 parent be04323 commit 22233b9

File tree

1 file changed

+1
-1
lines changed
  • pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Core

1 file changed

+1
-1
lines changed

pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Core/Model.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1910,7 +1910,7 @@ class Model {
19101910
$model_objects = [];
19111911
$is_parent_model_many = $model->is_parent_model_many();
19121912
$requests_pagination = ($limit or $offset);
1913-
$cache_exempt = ($requests_pagination or $reverse);
1913+
$cache_exempt = ($requests_pagination or $reverse or isset($parent_id));
19141914

19151915
# Throw an error if this Model has a $many parent Model, but no parent Model ID was given
19161916
if ($is_parent_model_many and !isset($parent_id)) {

0 commit comments

Comments
 (0)