feat: exclude PSD files from version control

This commit is contained in:
juanatsap
2025-11-11 13:53:14 +00:00
parent 97aa8971c1
commit 1f5aeb1c4c
13 changed files with 1200 additions and 25 deletions
+24
View File
@@ -13,6 +13,7 @@ import (
"github.com/juanatsap/cv-site/internal/config"
"github.com/juanatsap/cv-site/internal/handlers"
"github.com/juanatsap/cv-site/internal/middleware"
"github.com/juanatsap/cv-site/internal/models"
"github.com/juanatsap/cv-site/internal/templates"
)
@@ -27,6 +28,29 @@ func main() {
cfg := config.Load()
log.Printf("✓ Configuration loaded (env: %s)", os.Getenv("GO_ENV"))
// Initialize cache (1 hour TTL, configurable via env)
cacheTTL := 1 * time.Hour
if ttlEnv := os.Getenv("CACHE_TTL_MINUTES"); ttlEnv != "" {
if minutes, err := time.ParseDuration(ttlEnv + "m"); err == nil {
cacheTTL = minutes
}
}
models.InitCache(cacheTTL)
// Warm cache with default languages
log.Println("🔥 Warming cache...")
for _, lang := range []string{"en", "es"} {
// Warm CV cache
if _, err := models.LoadCV(lang); err != nil {
log.Printf("⚠️ Failed to warm CV cache for %s: %v", lang, err)
}
// Warm UI cache
if _, err := models.LoadUI(lang); err != nil {
log.Printf("⚠️ Failed to warm UI cache for %s: %v", lang, err)
}
}
log.Printf("✓ Cache warmed (TTL: %v)", cacheTTL)
// Initialize template manager
templateMgr, err := templates.NewManager(&cfg.Template)
if err != nil {