Enforce that the current number of elements in the cache don't exceed the argument value by flushing the cache if necessary. @param[in] c Cache to check @param[in] upper_limit_for_elements Soft upper limit for number of sp_head objects that can be stored in the cache. */
| 254 | objects that can be stored in the cache. |
| 255 | */ |
| 256 | void |
| 257 | sp_cache_enforce_limit(sp_cache *c, ulong upper_limit_for_elements) |
| 258 | { |
| 259 | if (c) |
| 260 | c->enforce_limit(upper_limit_for_elements); |
| 261 | } |
| 262 | |
| 263 | /************************************************************************* |
| 264 | Internal functions |
no test coverage detected