Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
darxriggs committed Feb 12, 2022
1 parent bf16182 commit 8b7959e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/main/docs/guide/usage/cacheManager.adoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
The plugin registers an instance of the link:{springApi}/org/springframework/cache/CacheManager.html[CacheManager] iterface as the `grailsCacheManager` Spring bean, so it's easy to access using dependency injection.
The plugin registers an instance of the link:{springApi}/org/springframework/cache/CacheManager.html[CacheManager] interface as the `grailsCacheManager` Spring bean, so it's easy to access using dependency injection.

The most common method you would call on the `grailsCacheManager` is `getCache(String name)` to access a link:{springApi}/org/springframework/cache/Cache.html[Cache] instance programmatically. This shouldn't be needed often however. From the `Cache` instance you can also access the underlying cache implementation using `cache.getNativeCache()`.
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ class BasicCachingServiceNoCacheManagerSpec extends Specification implements Ser
when: 'a cached method is invoked the first time'
def result = service.getData()

then: 'the code in the method is exeucted'
then: 'the code in the method is executed'
result == 'Hello World!'
service.invocationCounter == 1

when: 'a cached method is invoked the second time'
result = service.getData()

then: 'the code in the method is still exeucted because no cache manager is present'
then: 'the code in the method is still executed because no cache manager is present'
result == 'Hello World!'
service.invocationCounter == 2
}
Expand Down
6 changes: 3 additions & 3 deletions src/test/groovy/com/demo/BasicCachingServiceSpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class BasicCachingServiceSpec extends Specification implements ServiceUnitTest<B
when: 'a cached method is invoked the first time'
def result = service.getData()

then: 'the code in the method is exeucted'
then: 'the code in the method is executed'
result == 'Hello World!'
service.invocationCounter == 1

Expand All @@ -30,7 +30,7 @@ class BasicCachingServiceSpec extends Specification implements ServiceUnitTest<B
}

void 'test invoking a cacheable method that expresses a condition'() {
when: 'mutliply is called with x < 10'
when: 'multiply is called with x < 10'
def result = service.multiply(4, 7)

then: 'the method should have been invoked'
Expand All @@ -44,7 +44,7 @@ class BasicCachingServiceSpec extends Specification implements ServiceUnitTest<B
result == 280
service.conditionalInvocationCounter == 2

when: 'mutliply is called with x < 10 with a cached value'
when: 'multiply is called with x < 10 with a cached value'
result = service.multiply(4, 7)

then: 'the method should not have executed'
Expand Down

0 comments on commit 8b7959e

Please sign in to comment.