diff options
author | Costa Tsaousis <costa@netdata.cloud> | 2023-07-26 16:10:31 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-26 16:10:31 +0300 |
commit | 6daedef25bff12f39d46c582ea1010ebcac95329 (patch) | |
tree | 7553cca695b3ed63450078c49775702f117ee6a1 /libnetdata | |
parent | 33cdac2f68b724483725d364d6ed0980a9bb2078 (diff) |
fix expiration dates for API responses (#15546)
Diffstat (limited to 'libnetdata')
-rw-r--r-- | libnetdata/buffer/buffer.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libnetdata/buffer/buffer.c b/libnetdata/buffer/buffer.c index b437628633..e775b95176 100644 --- a/libnetdata/buffer/buffer.c +++ b/libnetdata/buffer/buffer.c @@ -15,6 +15,7 @@ void buffer_reset(BUFFER *wb) { wb->options = 0; wb->date = 0; wb->expires = 0; + buffer_no_cacheable(wb); buffer_overflow_check(wb); } @@ -254,6 +255,7 @@ BUFFER *buffer_create(size_t size, size_t *statistics) b->size = size; b->content_type = CT_TEXT_PLAIN; b->statistics = statistics; + buffer_no_cacheable(b); buffer_overflow_init(b); buffer_overflow_check(b); @@ -317,6 +319,7 @@ void buffer_json_initialize(BUFFER *wb, const char *key_quote, const char *value buffer_fast_strcat(wb, "{", 1); wb->content_type = CT_APPLICATION_JSON; + buffer_no_cacheable(wb); } void buffer_json_finalize(BUFFER *wb) { |