mirror of
https://github.com/lukaszraczylo/gohoarder.git
synced 2026-06-05 22:53:53 +00:00
4e7350363d
Previously, download counts only incremented on cache hits (when package was served from cache). First-time downloads (cache misses) were not counted. Changes: - Add UpdateDownloadCount() call when serving newly cached packages - This ensures every download through the proxy increments the counter - Analytics tracking also added for cache misses Behavior now: - First download (cache miss): counter = 1 - Second download (cache hit): counter = 2 - Third download (cache hit): counter = 3 - etc. Updated all relevant tests to expect the additional UpdateDownloadCount call. Resolves user requirement: "I want the counters to increase whenever package is downloaded via proxy - regardless of it being new download or cached download"