httpcache

package
v0.6.25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2025 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpCacheFile

type HttpCacheFile struct {
	CacheRoot string // Fixed typo from "CacehRoot" to "CacheRoot"
}

func (*HttpCacheFile) Clean

func (c *HttpCacheFile) Clean() error

Clean removes all files in the CacheRoot directory (preserves the root directory itself)

func (*HttpCacheFile) GetFile

func (c *HttpCacheFile) GetFile(uri string) (string, error)

func (*HttpCacheFile) IsExist

func (c *HttpCacheFile) IsExist(uri string) (bool, error)

IsExist checks if the cached file for the given URI exists (only checks files, not directories)

func (*HttpCacheFile) UriToFilePath

func (c *HttpCacheFile) UriToFilePath(uri string) (string, error)

uriToFilePath extracts the raw filename from URI and returns safe local path Rule: Store file as its original filename (e.g., kmcmake-0.1.15-any-any.tar.gz) under CacheRoot No validation for filename structure (per requirement)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL