refactor(service): adopt feature-based architecture and rename pkg/diskcache

- Moved GORM/Redis CAPTCHA manager from internal/service/cap directly into the cohesive CAPTCHA app folder at internal/apps/cap/.
- Moved background system cleanup handler from internal/service/cleanup.go into internal/apps/upload/cleanup.go.
- Completely removed the global internal/service directory to keep module logic self-contained.
- Renamed the core utility engine pkg/diskcache to pkg/cache/disk to separate underlying utility code from db/config integrations.
- Renamed DiskCache struct in pkg/cache/disk to Cache to resolve revive package-name stuttering warning.
- Regenerated Swagger API documentation and confirmed all tests compile and pass with 0 linter issues.
This commit is contained in:
ryan
2026-06-15 16:45:26 +08:00
parent 953af7d8db
commit 239711cea7
17 changed files with 73 additions and 78 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ import (
"github.com/Rain-kl/Wavelet/internal/db"
"github.com/Rain-kl/Wavelet/internal/model"
pkgcache "github.com/Rain-kl/Wavelet/pkg/diskcache"
pkgcache "github.com/Rain-kl/Wavelet/pkg/cache/disk"
)
// Status represents the runtime cache statistics.
@@ -35,7 +35,7 @@ var ErrCacheMiss = pkgcache.ErrCacheMiss
// DiskCache is a wrapper around the generic pkg/diskcache that integrates with the DB for configs.
type DiskCache struct {
*pkgcache.DiskCache
*pkgcache.Cache
}
var (