Commit Graph

13 Commits

Author SHA1 Message Date
3ac9b3bd87 hacked together load balancing reroutes in fileconfig (#211)
* hacked together load balancing reroutes in fileconfig

* some renaming and refactoring

* more renames

* hacked away the old config json

* test for issue 213

* renamed key

* dont share ports

* oops

* updated docs

* mvoed docs around

* port being used
2018-01-31 20:34:55 +00:00
48b5a32676 Implement mapping of HttpResponseMessage to CachedResponse to fix #152 (#153)
* changed name to cache options to fix issue #146

* Add acceptance test that exposes JSON deserialization bug from issue #146

- Create InMemoryJsonHandle for CacheManager that mimics DictionaryHandle but uses ICacheSerializer to serialize/deserialize values instead of saving references
- Add CacheManager.Serialization.Json package
- Add StartupWithCustomCacheHandle class that extends Startup and overrides ConfigureServices to register InMemoryJsonHandle
- Add GivenOcelotIsRunningUsingConsulToStoreConfigAndJsonSerializedCache method to initiate Ocelot with StartupWithCustomCacheHandle
- Add test should_return_response_200_with_simple_url_when_using_jsonserialized_cache

* Create Acceptance test that exposes issue #152

- Add GivenOcelotIsRunningUsingJsonSerializedCache() that initializes Ocelot with InMemoryJsonHandle
- Add should_return_cached_response_when_using_jsonserialized_cache test

* Change Consul port to 9502 on should_return_response_200_with_simple_url_when_using_jsonserialized_cache() test

* Implement mapping of HttpResponseMessage to CachedResponse to enable distributed caching

- Add CachedResponse class that holds HttpResponse data
- Add mapping methods in OutputCacheMiddleware to create HttpResponseMessage from CachedResponse and vice versa
- Replace HttpResponseMessage with CachedResponse in services registrations
- Replace HttpResponseMessage with CachedResponse in OutputCacheController's IOcelotCache

* Fix unit tests for OutputCacheMiddleware and OutputCacheController by replacing HttpResponseMessage with CachedResponse

* Add .editorconfig with default identation settings (spaces with size 4)

* Re-format broken files with new identation settings

* Add Startup_WithConsul_And_CustomCacheHandle class

- Use Startup_WithConsul_And_CustomCacheHandle in GivenOcelotIsRunningUsingConsulToStoreConfigAndJsonSerializedCache step

* Do minor cleanups

- Rename StartupWithCustomCacheHandle to Startup_WithCustomCacheHandle for better readability
- Remove cachemanager settings Action in Startup since it is not used anymore

* Drop Task in CreateHttpResponseMessage - unnecessary overhead

* Make setters private in CachedResponse

- Rework CreateCachedResponse to use new CachedResponse constructor
2017-11-25 14:47:17 +00:00
0f60a353ef now set region in config...or it defaults to something 2017-06-28 19:02:08 +01:00
e4e7fcc943 unit tests for cache clearing passing 2017-06-27 18:54:15 +01:00
239dcfb6bd working on region clearing cache, if using cachemanager back plance this would clear all servers in cluster 2017-06-26 19:10:20 +01:00
4d3d3e1bc0 changes to get this going again 2017-06-25 21:46:59 +01:00
7c1a277147 Fixed some unit tests 2017-04-18 14:05:15 +01:00
eeb8f691c7 Very hacky proof of concept 2017-04-17 21:25:04 +01:00
637d93dc4b Use DiagnosticListner for middleware logging
Instead of each middleware having to log that it has started and ended,
the DianosticListner package allows for capturing of these events in a
lightwieght manner.

This commit implements this and removes unncessary logging from most
middleware.
2017-04-17 11:23:34 +01:00
2dfdf0bb86 after much hacking unit tests passing 2017-02-21 07:34:47 +00:00
af506b079a more logging, more readme, more refactoring 2016-11-05 11:36:58 +00:00
8582ba45a9 Added some logging at last! 2016-11-04 20:17:15 +00:00
47afc850ff Added some basic cache stuff 2016-11-04 15:05:59 +00:00