Home / Function/ Test_Cache_CacheControl_Disabled() — fiber Function Reference

Test_Cache_CacheControl_Disabled() — fiber Function Reference

Architecture documentation for the Test_Cache_CacheControl_Disabled() function in cache_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  f4298b8a_2b31_5c9b_c294_49fcf1493afe["Test_Cache_CacheControl_Disabled()"]
  8453a087_9678_fe96_1b20_2d125b6f8656["cache_test.go"]
  f4298b8a_2b31_5c9b_c294_49fcf1493afe -->|defined in| 8453a087_9678_fe96_1b20_2d125b6f8656
  style f4298b8a_2b31_5c9b_c294_49fcf1493afe fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

middleware/cache/cache_test.go lines 504–524

func Test_Cache_CacheControl_Disabled(t *testing.T) {
	t.Parallel()

	app := fiber.New()

	app.Use(New(Config{
		Expiration:          10 * time.Second,
		DisableCacheControl: true,
	}))

	app.Get("/", func(c fiber.Ctx) error {
		return c.SendString("Hello, World!")
	})

	_, err := app.Test(httptest.NewRequest(fiber.MethodGet, "/", http.NoBody))
	require.NoError(t, err)

	resp, err := app.Test(httptest.NewRequest(fiber.MethodGet, "/", http.NoBody))
	require.NoError(t, err)
	require.Empty(t, resp.Header.Get(fiber.HeaderCacheControl))
}

Subdomains

Frequently Asked Questions

What does Test_Cache_CacheControl_Disabled() do?
Test_Cache_CacheControl_Disabled() is a function in the fiber codebase, defined in middleware/cache/cache_test.go.
Where is Test_Cache_CacheControl_Disabled() defined?
Test_Cache_CacheControl_Disabled() is defined in middleware/cache/cache_test.go at line 504.

Analyze Your Own Codebase

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

Try Supermodel Free