Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POST requests don't cache. (v2) #597

Open
Raboo opened this issue Feb 14, 2022 · 0 comments
Open

POST requests don't cache. (v2) #597

Raboo opened this issue Feb 14, 2022 · 0 comments

Comments

@Raboo
Copy link

Raboo commented Feb 14, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant