From 1a117dc511cffc26e9ee904e0f82538387406797 Mon Sep 17 00:00:00 2001 From: Ajeet D'Souza <98ajeet@gmail.com> Date: Thu, 20 Apr 2023 23:24:56 +0530 Subject: [PATCH] Updated Algorithm (markdown) --- Algorithm.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Algorithm.md b/Algorithm.md index a9c27b4..185f06e 100644 --- a/Algorithm.md +++ b/Algorithm.md @@ -30,3 +30,7 @@ Each directory in zoxide is assigned a _score_, starting with 1 the first time i zoxide uses a parameter called `_ZO_MAXAGE` to limit the number of entries in the database based on usage patterns. If the total score of the directories in the database exceeds this value, we divide each directory's score by a factor _k_ such that the new total score becomes ~90% of `_ZO_MAXAGE`. Thereafter, if the new score of any directory falls below 1, we remove it from the database. Theoretically, the maximum number of directories in the database is `4 * _ZO_MAXAGE`, although it is lower in practice. + +## Pruning + +Entries that no longer exist on the filesystem and are older than 90 days are lazily pruned from the database.