You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -1320,7 +1327,7 @@ function DICT:get_stale(key) end
1320
1327
--- Please note that while internally the key-value pair is set atomically, the atomicity does not go across the method call boundary.
1321
1328
---
1322
1329
---@paramkeystring
1323
-
---@paramvalueany
1330
+
---@paramvaluengx.shared.DICT.value
1324
1331
---@paramexptime?ngx.shared.DICT.exptime
1325
1332
---@paramflags?ngx.shared.DICT.flags
1326
1333
---@returnboolean ok # whether the key-value pair is stored or not
@@ -1331,7 +1338,7 @@ function DICT:set(key, value, exptime, flags) end
1331
1338
--- Similar to the `set` method, but never overrides the (least recently used) unexpired items in the store when running out of storage in the shared memory zone. In this case, it will immediately return `nil` and the string "no memory".
1332
1339
---
1333
1340
---@paramkeystring
1334
-
---@paramvalueany
1341
+
---@paramvaluengx.shared.DICT.value
1335
1342
---@paramexptime?ngx.shared.DICT.exptime
1336
1343
---@paramflags?ngx.shared.DICT.flags
1337
1344
---@returnboolean ok # whether the key-value pair is stored or not
@@ -1344,7 +1351,7 @@ function DICT:safe_set(key, value, exptime, flags) end
1344
1351
--- If the `key` argument already exists in the dictionary (and not expired for sure), the `success` return value will be `false` and the `err` return value will be `"exists"`.
1345
1352
---
1346
1353
---@paramkeystring
1347
-
---@paramvalueany
1354
+
---@paramvaluengx.shared.DICT.value
1348
1355
---@paramexptime?ngx.shared.DICT.exptime
1349
1356
---@paramflags?ngx.shared.DICT.flags
1350
1357
---@returnboolean ok # whether the key-value pair is stored or not
@@ -1355,7 +1362,7 @@ function DICT:add(key, value, exptime, flags) end
1355
1362
--- Similar to the `add` method, but never overrides the (least recently used) unexpired items in the store when running out of storage in the shared memory zone. In this case, it will immediately return `nil` and the string "no memory".
1356
1363
---
1357
1364
---@paramkeystring
1358
-
---@paramvalueany
1365
+
---@paramvaluengx.shared.DICT.value
1359
1366
---@paramexptime?ngx.shared.DICT.exptime
1360
1367
---@paramflags?ngx.shared.DICT.flags
1361
1368
---@returnboolean ok # whether the key-value pair is stored or not
@@ -1369,7 +1376,7 @@ function DICT:safe_add(key, value, exptime, flags) end
1369
1376
--- If the `key` argument does *not* exist in the dictionary (or expired already), the `success` return value will be `false` and the `err` return value will be `"not found"`.
1370
1377
---
1371
1378
---@paramkeystring
1372
-
---@paramvalueany
1379
+
---@paramvaluengx.shared.DICT.value
1373
1380
---@paramexptime?ngx.shared.DICT.exptime
1374
1381
---@paramflags?ngx.shared.DICT.flags
1375
1382
---@returnboolean ok # whether the key-value pair is stored or not
@@ -1417,15 +1424,19 @@ function DICT:delete(key) end
1417
1424
--- The `value` argument and `init` argument can be any valid Lua numbers, like negative numbers or floating-point numbers.
1418
1425
---
1419
1426
---
1420
-
---@paramkeystring
1421
-
---@paramvaluenumber
1422
-
---@paraminitnumber
1423
-
---@paraminit_ttlngx.shared.DICT.exptime
1427
+
---@paramkeystring
1428
+
---@paramvaluenumber
1429
+
---@paraminit?number
1430
+
---@paraminit_ttl?ngx.shared.DICT.exptime
1424
1431
---@returninteger?new
1425
1432
---@returnngx.shared.DICT.error?error
1426
1433
---@returnboolean forcible
1427
1434
functionDICT:incr(key, value, init, init_ttl) end
1428
1435
1436
+
--- Valid ngx.shared.DICT value for lists
1437
+
---@aliasngx.shared.DICT.list_value
1438
+
---| string
1439
+
---| number
1429
1440
1430
1441
--- Inserts the specified (numerical or string) `value` at the head of the list named `key`.
1431
1442
---
@@ -1434,16 +1445,16 @@ function DICT:incr(key, value, init, init_ttl) end
1434
1445
--- It never overrides the (least recently used) unexpired items in the store when running out of storage in the shared memory zone. In this case, it will immediately return `nil` and the string "no memory".
1435
1446
---
1436
1447
---@paramkeystring
1437
-
---@paramvalueany
1448
+
---@paramvaluengx.shared.DICT.list_value
1438
1449
---@returnnumber?len # number of elements in the list after the push operation
1439
1450
---@returnngx.shared.DICT.error?error
1440
-
functionDICT:lpush(key,value) end
1451
+
functionDICT:lpush(key,value) end
1441
1452
1442
1453
1443
1454
--- Similar to the `lpush` method, but inserts the specified (numerical or string) `value` at the tail of the list named `key`.
1444
1455
---
1445
1456
---@paramkeystring
1446
-
---@paramvalueany
1457
+
---@paramvaluengx.shared.DICT.list_value
1447
1458
---@returnnumber?len # number of elements in the list after the push operation
1448
1459
---@returnngx.shared.DICT.error?error
1449
1460
functionDICT:rpush(key, value) end
@@ -1454,7 +1465,7 @@ function DICT:rpush(key, value) end
1454
1465
--- If `key` does not exist, it will return `nil`. When the `key` already takes a value that is not a list, it will return `nil` and `"value not a list"`.
1455
1466
---
1456
1467
---@paramkeystring
1457
-
---@returnany?value
1468
+
---@returnngx.shared.DICT.list_value?item
1458
1469
---@returnngx.shared.DICT.error?error
1459
1470
functionDICT:lpop(key) end
1460
1471
@@ -1464,7 +1475,7 @@ function DICT:lpop(key) end
1464
1475
--- If `key` does not exist, it will return `nil`. When the `key` already takes a value that is not a list, it will return `nil` and `"value not a list"`.
0 commit comments