DATAKV-112 - Make caching repository queries more explicit.
We introduced an explicit CachingKeyValuePartTreeQuery and allow setting the gernal repository query stategy via QueryCreatorType. By default queries will not be cached. Original pull request: #18.
This commit is contained in:
committed by
Mark Paluch
parent
b40c8c1ed6
commit
551b27deb2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014 the original author or authors.
|
||||
* Copyright 2014-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -31,6 +31,7 @@ import org.springframework.context.annotation.Import;
|
||||
import org.springframework.data.keyvalue.core.KeyValueOperations;
|
||||
import org.springframework.data.keyvalue.core.KeyValueTemplate;
|
||||
import org.springframework.data.keyvalue.repository.config.QueryCreatorType;
|
||||
import org.springframework.data.keyvalue.repository.query.CachingKeyValuePartTreeQuery;
|
||||
import org.springframework.data.keyvalue.repository.query.SpelQueryCreator;
|
||||
import org.springframework.data.keyvalue.repository.support.KeyValueRepositoryFactoryBean;
|
||||
import org.springframework.data.repository.config.DefaultRepositoryBaseClass;
|
||||
@@ -49,7 +50,7 @@ import org.springframework.data.repository.query.QueryLookupStrategy.Key;
|
||||
@Documented
|
||||
@Inherited
|
||||
@Import(MapRepositoriesRegistrar.class)
|
||||
@QueryCreatorType(SpelQueryCreator.class)
|
||||
@QueryCreatorType(value = SpelQueryCreator.class, repositoryQueryType = CachingKeyValuePartTreeQuery.class)
|
||||
public @interface EnableMapRepositories {
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user