{
  "id": "readme",
  "title": "",
  "url": "https://redis.io/docs/latest/develop/use-cases/semantic-cache/java-jedis/readme/",
  "summary": "",
  "tags": [],
  "last_updated": "2026-06-01T09:32:08+01:00",
  "page_type": "content",
  "content_hash": "684cc75ca9d068c229ff3dda304b0cf6f97f02257429a0c9ca0c6e2f96786d18",
  "sections": [
    {
      "id": "content",
      "title": "Content",
      "role": "content",
      "text": "# Redis semantic-cache demo (Java + Jedis)\n\nSee `_index.md` for the full walkthrough. Quick start:\n\n[code example]\n\nThen open <http://localhost:8089>.\n\nNotable flags (full list with `--help`):\n\n| Flag                      | Default            |\n|---------------------------|--------------------|\n| `--port`                  | `8089`             |\n| `--redis-host`            | `localhost`        |\n| `--redis-port`            | `6379`             |\n| `--index-name`            | `semcache:idx`     |\n| `--key-prefix`            | `cache:`           |\n| `--ttl-seconds`           | `3600`             |\n| `--threshold`             | `0.5`              |\n| `--llm-latency-ms`        | `1500.0`           |\n| `--no-reset`              | (re-seeds by default) |"
    }
  ],
  "examples": [
    {
      "id": "content-ex0",
      "language": "bash",
      "code": "# 1. Make sure Redis with the Search module is running on localhost:6379.\n# 2. Build the fat jar (first build pulls Jedis, DJL, and the PyTorch\n#    native libraries; takes a minute or two):\nmvn -q package\n\n# 3. Run. The first run downloads the sentence-transformers/all-MiniLM-L6-v2\n#    PyTorch weights into the local DJL cache (~90 MB).\njava -jar target/semantic-cache-jedis.jar\n\n# Or with Maven directly:\nmvn -q exec:java",
      "section_id": "content"
    }
  ]
}
