- Updated the API server to support asset caching with a new flag for enabling/disabling caching. - Implemented asset caching logic in the DownloadProxyHandler to store and retrieve assets efficiently. - Added tests for asset caching functionality, ensuring proper behavior for cache hits and misses. - Introduced new documentation files for software, including multi-language support. - Enhanced the SoftwareCard component to display documentation links for software with available docs. - Updated the Software model to include a flag indicating the presence of documentation. - Improved the user interface for documentation navigation and search functionality.
22 lines
432 B
Go
22 lines
432 B
Go
package api
|
|
|
|
import "time"
|
|
|
|
const (
|
|
CompressionLevel = 5
|
|
|
|
LegalDir = "legal"
|
|
PrivacyFile = "privacy.txt"
|
|
TermsFile = "terms.txt"
|
|
DisclaimerFile = "disclaimer.txt"
|
|
|
|
// Avatar Cache
|
|
AvatarCacheLimit = 100 * 1024 * 1024 // 100MB
|
|
AvatarCacheInterval = 1 * time.Hour
|
|
|
|
// Asset Cache
|
|
AssetCacheDir = ".cache/assets"
|
|
AssetCacheLimit = 2 * 1024 * 1024 * 1024 // 2GB
|
|
AssetCacheInterval = 6 * time.Hour
|
|
)
|