cache ro+repo or just ro if no repo

This commit is contained in:
Paul Gauthier 2024-09-09 14:51:33 -07:00
parent b216d57107
commit fe2e36afda

View file

@ -31,10 +31,12 @@ class ChatChunks:
else: else:
self.add_cache_control(self.system) self.add_cache_control(self.system)
if self.readonly_files: if self.repo:
self.add_cache_control(self.readonly_files) # this will mark both the readonly_files and repomap chunk as cacheable
else:
self.add_cache_control(self.repo) self.add_cache_control(self.repo)
else:
# otherwise, just cache readonly_files if there are any
self.add_cache_control(self.readonly_files)
self.add_cache_control(self.chat_files) self.add_cache_control(self.chat_files)