* @brief Sets whether to use cached region information. * * @param use_cache True to use cached region information, false to clear the cache. */
| 77 | * @param use_cache True to use cached region information, false to clear the cache. |
| 78 | */ |
| 79 | inline void setUseCache(bool use_cache) |
| 80 | { |
| 81 | use_cache_ = use_cache; |
| 82 | if (!use_cache_) |
| 83 | { |
| 84 | cachedRegions_.clear(); |
| 85 | last_region_index_ = 0; |
| 86 | } |
| 87 | else |
| 88 | { |
| 89 | refreshRegionCache(); |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | * @brief Checks if a pointer is readable. |