BinaryCacheStore::addToStore(): Add NARs to the local cache
This commit is contained in:
		
							parent
							
								
									ca580bec35
								
							
						
					
					
						commit
						b24b8ef77c
					
				
					 3 changed files with 26 additions and 10 deletions
				
			
		|  | @ -114,8 +114,10 @@ void BinaryCacheStore::addToStore(const ValidPathInfo & info, const ref<std::str | |||
| 
 | ||||
|             auto narAccessor = makeNarAccessor(nar); | ||||
| 
 | ||||
|             if (accessor_) | ||||
|             if (accessor_) { | ||||
|                 accessor_->nars.emplace(info.path, narAccessor); | ||||
|                 accessor_->addToCache(info.path, *nar); | ||||
|             } | ||||
| 
 | ||||
|             std::function<void(const Path &, JSONPlaceholder &)> recurse; | ||||
| 
 | ||||
|  | @ -160,8 +162,10 @@ void BinaryCacheStore::addToStore(const ValidPathInfo & info, const ref<std::str | |||
|     } | ||||
| 
 | ||||
|     else { | ||||
|         if (accessor_) | ||||
|         if (accessor_) { | ||||
|             accessor_->nars.emplace(info.path, makeNarAccessor(nar)); | ||||
|             accessor_->addToCache(info.path, *nar); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     /* Compress the NAR. */ | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue