feat: exclude PSD files from version control
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user