# Usage

{% hint style="info" %}
Before continue with this section please follow [configuration](https://docs.eiffel.dev/features/caching/configuration) steps.
{% endhint %}

After the configuration, you should install **Eiffel.Caching.Abstractions** NuGet package into your application. This package contains common interfaces such as [`ICacheService`](https://docs.eiffel.dev/features/caching/api/icacheservice), [`ICacheServiceFactory`](https://docs.eiffel.dev/features/caching/api/icacheservicefactory) etc.

```sh
dotnet add package Eiffel.Caching.Abstractions
```

In your application services, controllers or other infrastructure service you can use `ICacheService` with dependency injection.&#x20;

```csharp
public class BookingService
{
    private readonly ICacheService _cacheService;
    public BookingService(ICacheService cacheService)
    {
        _cacheService = cacheService;
    }
    
    .. // Your implementation details
}
```

If you want to separate your data between different indexes in Redis you can use `ICacheServiceFactory`

```csharp
public class BookingService
{
    const int BookingCacheIndex = 10;
    
    private readonly ICacheService _cacheService;
    public BookingService(ICacheServiceFactory cacheServiceFactory)
    {
        _cacheService = cacheServiceFactory.Resolve(BookingCacheIndex);
    }
    
    .. // Your implementation details 
}
```
