File tree Expand file tree Collapse file tree
apps/workflowengine/lib/Check Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 */
77namespace OCA \WorkflowEngine \Check ;
88
9+ use OCP \Cache \CappedMemoryCache ;
910use OCP \IL10N ;
1011use OCP \IRequest ;
1112use OCP \WorkflowEngine \ICheck ;
1213
1314class RequestRemoteAddress implements ICheck {
14- /** @var array<string, bool> */
15- protected array $ checked = [];
15+ protected CappedMemoryCache $ checked ;
1616
1717 /**
1818 * @param IL10N $l
@@ -22,6 +22,7 @@ public function __construct(
2222 protected IL10N $ l ,
2323 protected IRequest $ request ,
2424 ) {
25+ $ this ->checked = new CappedMemoryCache ();
2526 }
2627
2728 /**
Original file line number Diff line number Diff line change 77namespace OCA \WorkflowEngine \Check ;
88
99use OCP \AppFramework \Utility \ITimeFactory ;
10+ use OCP \Cache \CappedMemoryCache ;
1011use OCP \IL10N ;
1112use OCP \WorkflowEngine \ICheck ;
1213
1314class RequestTime implements ICheck {
1415 public const REGEX_TIME = '([0-1][0-9]|2[0-3]):([0-5][0-9]) ' ;
1516 public const REGEX_TIMEZONE = '([a-zA-Z]+(?: \\/[a-zA-Z\-\_]+)+) ' ;
1617
17- /** @var bool[] */
18- protected $ cachedResults ;
18+ protected CappedMemoryCache $ cachedResults ;
1919
2020 /**
2121 * @param ITimeFactory $timeFactory
@@ -24,6 +24,7 @@ public function __construct(
2424 protected IL10N $ l ,
2525 protected ITimeFactory $ timeFactory ,
2626 ) {
27+ $ this ->cachedResults = new CappedMemoryCache ();
2728 }
2829
2930 /**
You can’t perform that action at this time.
0 commit comments