Home / Function/ overrideWhenHasExistingTimeToLiveEnablesCaching() — spring-boot Function Reference

overrideWhenHasExistingTimeToLiveEnablesCaching() — spring-boot Function Reference

Architecture documentation for the overrideWhenHasExistingTimeToLiveEnablesCaching() function in SoftReferenceConfigurationPropertyCacheTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  3afe88d4_d1b9_55a9_f67e_0d9e372b2cea["overrideWhenHasExistingTimeToLiveEnablesCaching()"]
  0dd19186_c37d_5ce6_8d1f_45d7ca24aaba["get()"]
  3afe88d4_d1b9_55a9_f67e_0d9e372b2cea -->|calls| 0dd19186_c37d_5ce6_8d1f_45d7ca24aaba
  94a887e5_77fb_c134_fd9d_6bdfe637a1fd["assertCounts()"]
  3afe88d4_d1b9_55a9_f67e_0d9e372b2cea -->|calls| 94a887e5_77fb_c134_fd9d_6bdfe637a1fd
  c56be156_978e_fe68_b642_d5efd67ff841["tick()"]
  3afe88d4_d1b9_55a9_f67e_0d9e372b2cea -->|calls| c56be156_978e_fe68_b642_d5efd67ff841
  style 3afe88d4_d1b9_55a9_f67e_0d9e372b2cea fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/context/properties/source/SoftReferenceConfigurationPropertyCacheTests.java lines 123–139

	@Test
	void overrideWhenHasExistingTimeToLiveEnablesCaching() {
		this.cache.setTimeToLive(Duration.ofHours(1));
		get(this.cache).assertCounts(0, 0);
		get(this.cache).assertCounts(0, 0);
		tick(Duration.ofHours(2));
		get(this.cache).assertCounts(0, 1);
		try (CacheOverride override = this.cache.override()) {
			get(this.cache).assertCounts(0, 1);
			tick(Duration.ofHours(2));
			get(this.cache).assertCounts(0, 1);
		}
		get(this.cache).assertCounts(0, 2);
		get(this.cache).assertCounts(0, 2);
		tick(Duration.ofHours(2));
		get(this.cache).assertCounts(0, 3);
	}

Domain

Subdomains

Frequently Asked Questions

What does overrideWhenHasExistingTimeToLiveEnablesCaching() do?
overrideWhenHasExistingTimeToLiveEnablesCaching() is a function in the spring-boot codebase.
What does overrideWhenHasExistingTimeToLiveEnablesCaching() call?
overrideWhenHasExistingTimeToLiveEnablesCaching() calls 3 function(s): assertCounts, get, tick.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free