https://github.com/lewiswatson/couchbase-spring-cache-demo
Example Spring Boot app using couchbase-spring-cache library, which is an "An implementation for Spring Cache based on Couchbase Java SDK 2.x".
https://github.com/lewiswatson/couchbase-spring-cache-demo
couchbase couchbase-spring-cache spring-boot spring-cache
Last synced: 10 months ago
JSON representation
Example Spring Boot app using couchbase-spring-cache library, which is an "An implementation for Spring Cache based on Couchbase Java SDK 2.x".
- Host: GitHub
- URL: https://github.com/lewiswatson/couchbase-spring-cache-demo
- Owner: LewisWatson
- License: apache-2.0
- Created: 2019-02-14T13:32:13.000Z (over 7 years ago)
- Default Branch: develop
- Last Pushed: 2019-02-18T06:40:47.000Z (over 7 years ago)
- Last Synced: 2025-03-27T00:30:20.478Z (about 1 year ago)
- Topics: couchbase, couchbase-spring-cache, spring-boot, spring-cache
- Size: 309 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Couchbase Spring Cache Demo
Example Spring Boot app using [couchbase-spring-cache] library, which is an "An implementation for Spring Cache based on Couchbase Java SDK 2.x".
Observations:
- [Java Serialization] is used to store values as a binary document. Therefore they will only be readable by similar JVM's on the other end.
- Document keys are made up of `cache::::`

## Integration Tests
### Run Integration Tests
A couchbase test server is required in order to run the integration tests. Instructions to set up such a server are provided in [Docker Couchbase Test Server](#DockerCouchbaseTestServer).
```bash
./gradlew test
```
### Docker Couchbase Test Server
1. spin up container
```bash
docker run -d --name db -p 8091-8094:8091-8094 -p 11210:11210 couchbase:6.0.0
```
1. Visit [http://localhost:8091](http://localhost:8091) on the host machine to see the Web Console
1. Walk through the Setup wizard and accept the default values.
- You may need to disable analytics if the defaults won't run in your environment.
1. Add a `dog_cache` bucket with default settings.
1. Navigate to `Security -> Add User` to create a new user called `dog_cache`, with password `password`, and `Application Access` permissions on `dog_cache` bucket.
For further information on the couchbase container, see [dockerhub.com/couchbase].
[Couchbase]: https://www.couchbase.com/
[Spring Data Couchbase]: https://spring.io/projects/spring-data-couchbase
[couchbase-spring-cache]: https://github.com/couchbaselabs/couchbase-spring-cache
[Spring Cache]: https://spring.io/guides/gs/caching/
[Java Serialization]: https://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html
[dockerhub.com/couchbase]: https://hub.docker.com/_/couchbase