Skip to content

Use cache#3

Merged
bact merged 8 commits into
mainfrom
use-cache
Apr 28, 2026
Merged

Use cache#3
bact merged 8 commits into
mainfrom
use-cache

Conversation

@bact

@bact bact commented Apr 28, 2026

Copy link
Copy Markdown
Owner
  1. When user ask to update the database without specifying the licenst list version number, it means update to the latest version. Check the license list version in the database. If it is already the latest. Do not update.

  2. When user ask to update the database with a specific license list version number. Check the license list version in the database. If it is already that specific version. Do not update.

  3. Cache licenses.json (from https://spdx.org/licenses/licenses.json). Cache SPDX license data tarball. Cache GitHub license popularity data. Keep the files in the same directory as the SQLite database file.

    3.1) https://spdx.org/licenses/licenses.json contains latest license list version and release date
    3.2) https://spdx.org/licenses/licenses.json cache will expire after 45 days
    3.3) GitHub license popularity data cache will expire after 75 days
    3.4) SPDX license data is versioned, so it will not expired

  4. When user put --force option (licenseid update --force), update the database without checking the license list version in the database. If cache license data of that version is available, use cache.

  5. When user put --no-cache option (licenseid update --no-cache), don't use cache. Don't delete cache.

  6. When user put --clear-cache option (licenseid update --clear-cache), delete cache.

  7. When update the database, tell the user that the data source is from local file, from remote, or from cache of remote

bact added 2 commits April 28, 2026 13:22
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
@bact bact added the enhancement New feature or request label Apr 28, 2026
bact added 6 commits April 28, 2026 13:54
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
@bact
bact merged commit e86e2d1 into main Apr 28, 2026
8 checks passed
@bact
bact deleted the use-cache branch April 28, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant