| 999 | |
| 1000 | |
| 1001 | shared_ptr<FetcherProcess::Cache::Entry> FetcherProcess::Cache::create( |
| 1002 | const string& cacheDirectory, |
| 1003 | const Option<string>& user, |
| 1004 | const CommandInfo::URI& uri) |
| 1005 | { |
| 1006 | const string key = cacheKey(user, uri.value()); |
| 1007 | const string filename = nextFilename(uri); |
| 1008 | |
| 1009 | auto entry = shared_ptr<Cache::Entry>( |
| 1010 | new Cache::Entry(key, cacheDirectory, filename)); |
| 1011 | |
| 1012 | table.put(key, entry); |
| 1013 | lruSortedEntries.push_back(entry); |
| 1014 | |
| 1015 | VLOG(1) << "Created cache entry '" << key << "' with file: " << filename; |
| 1016 | |
| 1017 | return entry; |
| 1018 | } |
| 1019 | |
| 1020 | |
| 1021 | Option<shared_ptr<FetcherProcess::Cache::Entry>> |