31 lines
623 B
PHP
31 lines
623 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Services\Cache\CacheInvalidator;
|
|
use App\Services\Cache\CacheKeyBuilder;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
$this->app->singleton(CacheKeyBuilder::class, function () {
|
|
return new CacheKeyBuilder(version: 'v1');
|
|
});
|
|
|
|
$this->app->singleton(CacheInvalidator::class);
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
//
|
|
}
|
|
}
|