mirror of
https://github.com/semihalev/twig.git
synced 2026-03-14 13:55:46 +01:00
- Added tracking of last access time and access count to cache entries - Implemented eviction policy to remove least recently/frequently used entries - Cache now removes 10% of entries when the cache is full, prioritizing by usage - Added benchmarks and tests to verify eviction strategy - Fixed the previously ineffective eviction strategy - Improved cache efficiency for applications with many diverse object types 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
15 lines
246 B
Go
15 lines
246 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"time"
|
|
)
|
|
|
|
func main() {
|
|
fmt.Printf("Running serialization benchmarks at %s\n", time.Now().Format(time.RFC1123))
|
|
|
|
// Run benchmarks
|
|
benchmarkSerialization()
|
|
|
|
fmt.Println("\nBenchmarks completed successfully.")
|
|
}
|