Skip to content

Commit

Permalink
Increased the default TTL value
Browse files Browse the repository at this point in the history
  • Loading branch information
avpaderno committed Feb 16, 2025
1 parent c5ceadb commit e690ec0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/simpletest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
with:
php-version: ${{ env.PHP_VERSION }}
extensions: apcu
ini-values: apc.enabled=1, apc.enable_cli=1, apc.shm_size = 512M
ini-values: apc.enabled=1, apc.enable_cli=1, apc.ttl = 480, apc.shm_size = 512M
coverage: none

- name: Set up Apache
Expand Down
6 changes: 3 additions & 3 deletions includes/apc_storage_queue.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class ApcStorageQueue implements BackdropQueueInterface {
$item->item_id = ApcStorageHelper::uniqueId();
$item->expire = 0;

return apcu_store($this->queueKeyName($item), $item, 0);
return apcu_store($this->queueKeyName($item), $item);
}

return FALSE;
Expand Down Expand Up @@ -95,7 +95,7 @@ class ApcStorageQueue implements BackdropQueueInterface {
if ($item['value']->expire == 0) {
$item['value']->expire = time() + $lease_time;

if (apcu_store($item['key'], $item['value'], 0)) {
if (apcu_store($item['key'], $item['value'])) {
return $item['value'];
}
}
Expand All @@ -121,7 +121,7 @@ class ApcStorageQueue implements BackdropQueueInterface {
$item->expire = 0;

if (extension_loaded('apcu') && apcu_enabled()) {
return apcu_store($this->queueKeyName($item), $item, 0);
return apcu_store($this->queueKeyName($item), $item);
}

return FALSE;
Expand Down
4 changes: 2 additions & 2 deletions tests/apc_storage_queue.test
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,10 @@ class ApcStorageQueueTestCase extends ApcStorageBaseTestCase {
$count = count($data->items);
$queue = BackdropQueue::get($name);
$data->claimedItems = 0;
$data->claimedObjects = [];
$data->claimedObjects = array();

for ($i = 0; $i < $count; $i++) {
$obj = $queue->claimItem();
$data->claimedObjects[] = $obj = $queue->claimItem();

$message = format_string(
'An item was claimed from the @queue queue.',
Expand Down

0 comments on commit e690ec0

Please sign in to comment.