mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
fix: Create context cache only when prefix matches with previous request
PiperOrigin-RevId: 817468275
This commit is contained in:
committed by
Copybara-Service
parent
731bb9078d
commit
9e0b1fb62b
@@ -36,7 +36,7 @@ class TestCachePerformanceAnalyzer:
|
||||
self.analyzer = CachePerformanceAnalyzer(self.mock_session_service)
|
||||
|
||||
def create_cache_metadata(
|
||||
self, invocations_used=1, cache_name="test-cache", cached_contents_count=5
|
||||
self, invocations_used=1, cache_name="test-cache", contents_count=5
|
||||
):
|
||||
"""Helper to create test CacheMetadata."""
|
||||
return CacheMetadata(
|
||||
@@ -46,7 +46,7 @@ class TestCachePerformanceAnalyzer:
|
||||
expire_time=time.time() + 1800,
|
||||
fingerprint="test_fingerprint",
|
||||
invocations_used=invocations_used,
|
||||
cached_contents_count=cached_contents_count,
|
||||
contents_count=contents_count,
|
||||
created_at=time.time() - 600,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user