trickster icon indicating copy to clipboard operation
trickster copied to clipboard

POST requests don't cache. (v2)

Open Raboo opened this issue 2 years ago • 0 comments

Hi

I'm running trickster v2.0-beta2 and I am trying to cache POST requests with JSON data. I can't seem to get trickster to cache the posts. The response gets this header.

X-Trickster-Result: engine=HTTPProxy; status=proxy-only

My request goes to http://trickstercache/api/query

This is my config

main:
  config_handler_path: /trickster/config
  ping_handler_path: /trickster/ping
  health_handler_path: /trickster/health
frontend:
  listen_port: 8480
backends:
  default:
    provider: reverseproxycache
    origin_url: http://opentsdb-ro.opentsdb.svc.cluster.local:4242
    timeout_ms: 40000
    cache_name: default
    compressable_types:
      - text/javascript, text/css, text/plain, text/xml, text/json, application/json, application/javascript, application/xml ]
    healthcheck:
      verb: GET
      path: /api/version
    paths:
      query:
        path: /api/query
        methods: [ GET, POST ]
        match_type: prefix
        handler: proxycache
caches:
  default:
    provider: memory
    index:
      max_size_bytes: 536870912
negative_caches:
  default:
    "400": 3000
    "404": 3000
    "500": 3000
    "502": 3000
logging:
  log_level: info
metrics:
  listen_port: 8481

What am I doing wrong?

Raboo avatar Feb 14 '22 10:02 Raboo