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
* graph,node,store: Add option to remove stale call_cache in graphman
Signed-off-by: Maksim Dimitrov <[email protected]>
* docs: Update graphman usage documentation
Signed-off-by: Maksim Dimitrov <[email protected]>
* store: Add clear_stale_call_cache test
Signed-off-by: Maksim Dimitrov <[email protected]>
* node: Add max contracts option and value validations
Signed-off-by: Maksim Dimitrov <[email protected]>
* graph, store: Batch stale contracts and handle max limit
Signed-off-by: Maksim Dimitrov <[email protected]>
* test: Update tests case
Signed-off-by: Maksim Dimitrov <[email protected]>
* docs: Update graphman docs
Signed-off-by: Maksim Dimitrov <[email protected]>
* store: Update the cache test
Signed-off-by: Maksim Dimitrov <[email protected]>
---------
Signed-off-by: Maksim Dimitrov <[email protected]>
Copy file name to clipboardExpand all lines: docs/graphman.md
+35-10Lines changed: 35 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -371,21 +371,30 @@ Inspect all blocks after block `13000000`:
371
371
372
372
Remove the call cache of the specified chain.
373
373
374
-
If block numbers are not mentioned in `--from` and `--to`, then all the call cache will be removed.
374
+
Either remove entries in the range `--from` and `--to`, remove stale contracts which have not been accessed for a specified duration `--ttl_days`, or remove the entire cache with `--remove-entire-cache`. Removing the entire cache can reduce indexing performance significantly and should generally be avoided.
Limit the number of contracts to consider for stale contract removal
387
+
388
+
-f, --from <FROM>
389
+
Starting block number
385
390
386
-
-t, --to <TO>
391
+
-t, --to <TO>
387
392
Ending block number
388
393
394
+
-h, --help
395
+
Print help (see a summary with '-h')
396
+
397
+
389
398
### DESCRIPTION
390
399
391
400
Remove the call cache of a specified chain.
@@ -404,6 +413,15 @@ the first block number will be used as the starting block number.
404
413
The `to` option is used to specify the ending block number of the block range. In the absence of `to` option,
405
414
the last block number will be used as the ending block number.
406
415
416
+
#### `--remove-entire-cache`
417
+
The `--remove-entire-cache` option is used to remove the entire call cache of the specified chain.
418
+
419
+
#### `--ttl-days <TTL_DAYS>`
420
+
The `--ttl-days` option is used to remove stale contracts based on the `call_meta.accessed_at` field. For example, if `--ttl-days` is set to 7, all calls to a contract that has not been accessed in the last 7 days will be removed from the call cache.
421
+
422
+
#### `--ttl-max-contracts <TTL_MAX_CONTRACTS>`
423
+
The `--ttl-max-contracts` option is used to limit the maximum number of contracts to be removed when using the `--ttl-days` option. For example, if `--ttl-max-contracts` is set to 100, at most 100 contracts will be removed from the call cache even if more contracts meet the TTL criteria.
424
+
407
425
### EXAMPLES
408
426
409
427
Remove the call cache for all blocks numbered from 10 to 20:
@@ -412,5 +430,12 @@ Remove the call cache for all blocks numbered from 10 to 20:
0 commit comments