Skip to content

v0.14.1

Latest
Compare
Choose a tag to compare
@jakesylvestre jakesylvestre released this 20 Apr 20:44
1150f5e
Add cache controls to the entropy fork (#2)

* basic structure for a cache example

* feat: add basic cache control interation

* chore: update cache example to use cache control

* feat: change scope from cache control to enum

* simplify the cache example

* change the type of Hint.maxAge from uint32 to float64. doing it we are respecting the contrat of time.Duration.Seconds()

* add tests for writeCacheControl util method

* add doc for GetOverralCachePollicy

* feat(http_post transport): add option to write cache control header

* feat(http_get transport): add option to write cache control header

* chore(http_post): wsl

* tests(graphql.cache): add tests for cache overwall policy

* refactor(graphql.cache): change from string "PRIVATE" to use the costanst

* delete example/cache

* add cachecontrol example

* remove todo commentary

* fix(graphql.cache): fix --race tests on SetCacheHint

* refactor: migrate EnableCache function to extension.Cache

* fix: add cache ResponseInterceptor in transport tests

* fix: fixing --race tests. Add lock in CacheControl.AddHint

* fix: broken tests and extract cache manipulation context in one place

* fix(graphql.cache): govet copylocks

* docs: add docs to explain cache features

* tests(extension.Cache): Add tests

* fix(docs): typo

* refactor: organize package, move 'extensions.Cache' to 'cache.Extension'

* refactor: rename cache/cache to cache/extension

* refactor: move all cache references from graphql pkg to cache pkg

* update doc

* fix merge conflict

* lint

* fix caching issues

Co-authored-by: Leonardo Andrade <leonardo.andrade@corp.globo.com>