Commit graph

16 commits

Author SHA1 Message Date
Siyuan Liu
c7f7bef9ec
move cache2 package to cache (#14921)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-07-18 13:31:06 +05:30
Siyuan Liu
6a5dd550c8
migrate direct usage of lru to cache2 (#14508)
Automatic Merge
2020-06-02 06:01:30 -07:00
Jesús Espino
06fb1458ca
Use always strings for cache keys (#13631)
* Use always strings for cache keys

* fixing tests

* Addressing PR review comments

* Adding the base to FormatInt

* Fix typo
2020-01-22 15:59:59 +01:00
Hector
62b57143c8 [MM 19840] Create a Cache Interface abstraction to support multiple cache backends (#13384)
* Refactor to use structured logging

* Properly formatted with gofmt

* created interface Cache, but construction of cache is still coupled.

* Implementing cache factories to build caches

* Simple redis implementation without error handling. Keys and values by default are string

* refactor NewLocalCacheLayer to inject cache factory

* Removed redis impl to focus on cache abstraction

* CacheFactory injected on sqlsupplier and saved in Store struct

* remove useless private method

* replace concrete declaration of lru cache to cache abstraction

* discard spaces

* Renamed factory to provider because concrete implementations of factories may hold an state (such as a redis client for example)

* refactor to include all caches in the same package cache and subpackages

* method close cache. This method will be used for concrete implementations that need to release resources (close a connection, etc)

* closing cacheprovider and releasing resources while closing sql store

* fixed merge conflict fail

* gofmt files

* remove unused property from post_store

* naming refactor to avoid stutter. Added godocs on interface

* Store doesnt know anything about the cache and provider. Cache provider will be built after loading config and injected in localCacheLayer

* fixed broken test

* cache provider initialized before RunOldAppInitialization which initializes the localcachelayer

* move statusCache to server to initialize it with the new cache provider

* update terms_service and channel_layer to have new cacheProvider

* gofmt

* Add Connect method to the cache provider

* mock cacheprovider in user_layer_test

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-01-09 09:57:28 +01:00
Jesús Espino
a63684fcb5
Consistent license message for all the go files (#13235)
* Consistent license message for all the go files

* Fixing the last set of unconsistencies with the license headers

* Addressing PR review comments

* Fixing busy.go and busy_test.go license header
2019-11-29 12:59:40 +01:00
Miguel de la Cruz
2259b7f2a8
[MM-19948] Set version on module file and internal paths (#13186)
* [MM-19948] Set version on module file and internal paths

* Fixes after merge

* Fix i18n checker error
2019-11-28 14:39:38 +01:00
Harrison Healey
ba5566d1a0
MM-10417 Add local image proxy and enable by default (#9967)
* MM-10417 Add local image proxy and enable by default

* Remove unused function

* Add dependencies for willnorris/imageproxy

* Fixed compilation errors

* Lock to the master version of willnorris/imageproxy

* Fix atmos/camo proxy when no SiteURL is specified

* Re-add default values for deprecated settings

* Fix unit tests added by merge

* Pass imageproxy to App struct

* Remove unneeded locking when creating the image proxy

* Remove empty test file
2019-01-24 16:11:32 -04:00
Christopher Speller
da265fbaf7
Moving app from singular to being created for every request (#9889)
* Moving app from singular to being created for every request.

* Automatic refactor

* Adding license header

* Feedback fixes
2018-11-28 10:56:21 -08:00
Harrison Healey
2959b53d98 MM-11272 Add OpenGraph and image dimension metadata to posts (#9313)
* Move OpenGraph code into its own file

* Move OpenGraph image proxying to app layer

* Move test file code out of api4 package

* MM-11272 Add OpenGraph and image dimension metadata to posts
2018-11-01 15:25:11 -04:00
Christopher Speller
ba6f9075c1 Fix opengraph images not going through the image proxy. (#8627) 2018-04-16 09:00:59 -04:00
Chris
91bfc72a99 Reduce logging data races, fix MySQL test race condition (#7994)
* fix races

* revert unintentional change

* fix test as intended
2017-12-22 12:09:33 +00:00
Chris
77a1dc1f2f HTTP client refactor (#7884)
* http client refactor

* simplification
2017-11-22 10:15:03 -05:00
Chris
8e19ba029f Reduce utils.Cfg references (#7650)
* app.UpdateConfig method

* test fix

* another test fix

* the config override option as-was is just error prone, remove it for now

* derp
2017-10-18 15:36:43 -07:00
Chris
dcf9e96a0b remove global refs from api/api4 (#7496) 2017-09-22 13:54:27 -04:00
Christopher Speller
29fca51821
Renaming repo 2017-09-06 23:11:59 -07:00
Carlos Tadeu Panato Junior
16581ae431 implement open graph metadata for apiV4 (#6343) 2017-05-10 11:44:18 +01:00