Skip to content

Commit

Permalink
Polish "Improve documentation of Cacheable"
Browse files Browse the repository at this point in the history
Apply the same improvements to CacheEvict and CachePut.

See gh-28183
  • Loading branch information
snicoll committed Jul 29, 2022
1 parent 3a61930 commit 04209de
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2022 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.
Expand Down Expand Up @@ -111,7 +111,8 @@

/**
* Spring Expression Language (SpEL) expression used for making the cache
* eviction operation conditional.
* eviction operation conditional. Evict that cache if the condition evaluates
* to {@code true}.
* <p>Default is {@code ""}, meaning the cache eviction is always performed.
* <p>The SpEL expression evaluates against a dedicated context that provides the
* following meta-data:
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2021 the original author or authors.
* Copyright 2002-2022 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.
Expand Down Expand Up @@ -118,7 +118,8 @@

/**
* Spring Expression Language (SpEL) expression used for making the cache
* put operation conditional.
* put operation conditional. Update the cache if the condition evaluates to
* {@code true}.
* <p>This expression is evaluated after the method has been called due to the
* nature of the put operation and can therefore refer to the {@code result}.
* <p>Default is {@code ""}, meaning the method result is always cached.
Expand All @@ -142,6 +143,7 @@

/**
* Spring Expression Language (SpEL) expression used to veto the cache put operation.
* Veto updating the cache if the condition evaluates to {@code true}.
* <p>Default is {@code ""}, meaning that caching is never vetoed.
* <p>The SpEL expression evaluates against a dedicated context that provides the
* following meta-data:
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2021 the original author or authors.
* Copyright 2002-2022 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.
Expand Down Expand Up @@ -123,8 +123,8 @@

/**
* Spring Expression Language (SpEL) expression used for making the method
* caching conditional. If condition is evaluated to {@code true}, result
* is cached.
* caching conditional. Cache the result if the condition evaluates to
* {@code true}.
* <p>Default is {@code ""}, meaning the method result is always cached.
* <p>The SpEL expression evaluates against a dedicated context that provides the
* following meta-data:
Expand All @@ -143,6 +143,7 @@

/**
* Spring Expression Language (SpEL) expression used to veto method caching.
* Veto caching the result if the condition evaluates to {@code true}.
* <p>Unlike {@link #condition}, this expression is evaluated after the method
* has been called and can therefore refer to the {@code result}.
* <p>Default is {@code ""}, meaning that caching is never vetoed.
Expand Down

0 comments on commit 04209de

Please sign in to comment.