CacheServiceProvider class

Service provider for cache system. Registers all cache-related dependencies in the service container.

This provider follows the dependency injection pattern and registers:

  • CacheDriverRegistry: Manages cache driver registration
  • CacheStatisticsManager: Handles cache performance metrics
  • CacheTagManager: Manages cache tags for group invalidation
  • CacheValidator: Validates cache operations and inputs
  • CacheConfigLoader: Loads cache configuration and initializes drivers
  • CacheManager: Main facade for cache operations

Usage

// Register the service provider
final container = ContainerInterface();
container.register(CacheServiceProvider());

// Resolve the cache manager
final cache = container.resolve<CacheManager>();
Implemented types

Constructors

CacheServiceProvider()

Properties

hashCode int
The hash code for this object.
no setterinherited
isDeferred bool
If true, the provider is deferred and only loaded when its services are requested.
no setteroverride
provides List<Type>
The services provided by this provider.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

boot(ContainerInterface container) Future<void>
Called after all providers are registered (for initialization).
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
register(ContainerInterface container) → void
Called when the provider is registered in the container.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited