• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2024 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef NET_DISK_CACHE_MEMORY_ENTRY_DATA_HINTS_H_
6 #define NET_DISK_CACHE_MEMORY_ENTRY_DATA_HINTS_H_
7 
8 #include <stdint.h>
9 
10 // On memory hint flags for the disk cache entry.
11 enum MemoryEntryDataHints : uint8_t {
12   // If this hint is set, the caching headers indicate we can't do anything
13   // with this entry (unless we are ignoring them thanks to a loadflag),
14   // i.e. it's expired and has nothing that permits validations.
15   HINT_UNUSABLE_PER_CACHING_HEADERS = (1 << 0),
16 
17   // If this hint is set, the entry will be cached with priority. So the
18   // eviction policy will less likely evict the entry.
19   HINT_HIGH_PRIORITY = (1 << 1),
20 
21   // Note: This hint flags are converted into a 8 bit field. So we can't have
22   // more than 8 hints. This restriction comes from the fact that there are tens
23   // of thousands of entries, and we need to keep the hint field size small.
24 };
25 
26 #endif  // NET_DISK_CACHE_MEMORY_ENTRY_DATA_HINTS_H_
27