Skip to content

Commit

Permalink
Merge pull request #1386 from michael-simons:SPR-15448
Browse files Browse the repository at this point in the history
* pr/1386:
  Polish condition in caching examples
  • Loading branch information
snicoll committed Apr 13, 2017
2 parents 0b11832 + 33fd94c commit 37d0db1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/docs/asciidoc/integration.adoc
Expand Up @@ -8304,7 +8304,7 @@ if the argument `name` has a length shorter than 32:
[source,java,indent=0]
[subs="verbatim,quotes"]
----
@Cacheable(cacheNames="book", **condition="#name.length < 32"**)
@Cacheable(cacheNames="book", **condition="#name.length() < 32"**)
public Book findBook(String name)
----

Expand All @@ -8316,7 +8316,7 @@ only want to cache paperback books:
[source,java,indent=0]
[subs="verbatim,quotes"]
----
@Cacheable(cacheNames="book", condition="#name.length < 32", **unless="#result.hardback"**)
@Cacheable(cacheNames="book", condition="#name.length() < 32", **unless="#result.hardback"**)
public Book findBook(String name)
----

Expand All @@ -8327,7 +8327,7 @@ supported wrapper so the previous example can be rewritten as follows:
[source,java,indent=0]
[subs="verbatim,quotes"]
----
@Cacheable(cacheNames="book", condition="#name.length < 32", **unless="#result.hardback"**)
@Cacheable(cacheNames="book", condition="#name.length() < 32", **unless="#result.hardback"**)
public Optional<Book> findBook(String name)
----

Expand Down

0 comments on commit 37d0db1

Please sign in to comment.