mirror of
https://github.com/SamyRai/tercul-backend.git
synced 2025-12-27 04:01:34 +00:00
21 lines
417 B
Go
21 lines
417 B
Go
package cache
|
|
|
|
import (
|
|
"context"
|
|
|
|
platform_cache "tercul/internal/platform/cache"
|
|
)
|
|
|
|
type entityTypeInvalidator interface {
|
|
InvalidateEntityType(ctx context.Context, entityType string) error
|
|
}
|
|
|
|
func invalidateEntityType(ctx context.Context, c platform_cache.Cache, entityType string) {
|
|
if c == nil {
|
|
return
|
|
}
|
|
if inv, ok := c.(entityTypeInvalidator); ok {
|
|
_ = inv.InvalidateEntityType(ctx, entityType)
|
|
}
|
|
}
|