[PR #66] [MERGED] refactor(api): move TTLCache usage to CLI-only #146

Closed
opened 2026-05-05 03:26:44 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/XuehaiPan/nvitop/pull/66
Author: @XuehaiPan
Created: 4/7/2023
Status: Merged
Merged: 4/7/2023
Merged by: @XuehaiPan

Base: mainHead: move-ttl-cache


📝 Commits (3)

  • ac56c6a refactor(api): move TTLCache usage to CLI-only
  • dbc2f65 docs(CHANGELOG): update CHANGELOG.md
  • 7b54f40 feat(workflows): add import tests for Python 3.7

📊 Changes

6 files changed (+38 additions, -50 deletions)

View changed files

📝 .github/workflows/lint.yaml (+10 -0)
📝 CHANGELOG.md (+1 -1)
📝 nvitop/api/device.py (+2 -25)
📝 nvitop/api/host.py (+10 -10)
📝 nvitop/api/process.py (+0 -1)
📝 nvitop/gui/library/device.py (+15 -13)

📄 Description

Issue Type

  • Breaking changes

Description

Move TTLCache usage to CLI-only. Public APIs in nvitop.api will always return immediate results.

Motivation and Context

In the previous implementation, the public APIs may return cached results. Now all caching mechanisms are moved to CLI-only. This is more consistent with other packages such as psutil.Process.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/XuehaiPan/nvitop/pull/66 **Author:** [@XuehaiPan](https://github.com/XuehaiPan) **Created:** 4/7/2023 **Status:** ✅ Merged **Merged:** 4/7/2023 **Merged by:** [@XuehaiPan](https://github.com/XuehaiPan) **Base:** `main` ← **Head:** `move-ttl-cache` --- ### 📝 Commits (3) - [`ac56c6a`](https://github.com/XuehaiPan/nvitop/commit/ac56c6a7ab1377beeaf6bb5018f7e8d6d9441bf4) refactor(api): move `TTLCache` usage to CLI-only - [`dbc2f65`](https://github.com/XuehaiPan/nvitop/commit/dbc2f65b9714271fb118b9e28088947299db5517) docs(CHANGELOG): update CHANGELOG.md - [`7b54f40`](https://github.com/XuehaiPan/nvitop/commit/7b54f40f97512d47b4c3f0c34e92f9913825b653) feat(workflows): add import tests for Python 3.7 ### 📊 Changes **6 files changed** (+38 additions, -50 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/lint.yaml` (+10 -0) 📝 `CHANGELOG.md` (+1 -1) 📝 `nvitop/api/device.py` (+2 -25) 📝 `nvitop/api/host.py` (+10 -10) 📝 `nvitop/api/process.py` (+0 -1) 📝 `nvitop/gui/library/device.py` (+15 -13) </details> ### 📄 Description <!-- Provide a descriptive summary of the changes in the title above --> #### Issue Type <!-- Pick relevant types and delete the rest --> - Breaking changes #### Description <!-- Describe the changes in detail --> Move `TTLCache` usage to CLI-only. Public APIs in `nvitop.api` will always return immediate results. #### Motivation and Context <!-- Why are these changes required? --> <!-- What problems do these changes solve? --> <!-- Link to relevant issues --> In the previous implementation, the public APIs may return cached results. Now all caching mechanisms are moved to CLI-only. This is more consistent with other packages such as `psutil.Process`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 03:26:44 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/nvitop#146
No description provided.