Skip to content

Conversation

@Bilge
Copy link
Member

@Bilge Bilge commented Oct 24, 2017

This key change brings the following improvements to CachingConnector.

  • Connector implementations no longer have to extend CachingConnector to provide caching facilities: all connectors can be decorated with CachingConnector with no prior knowledge of the existence of such facility. This completely removes the burden on implementations to be aware of caching concerns.
  • Frees up the inheritance chain for Connector implementations to use however else they see fit.

Technical changes

  • Changed CachingConnector from abstract class to concrete decorator.
  • Replaced CachedAdvice with simple boolean (cache or cache not; there is no try).
  • Removed superfluous Cache interface.
  • Removed superfluous enumeration dependency.
  • Renamed SuperConnector -> ImportConnector.

Bilge added 2 commits July 22, 2017 19:13
Removed CacheAdvice (simplified to boolean).
Removed obsolete Cache interface.
Renamed SuperConnector -> ImportConnector and added class comment.
Removed dependency on eloquent/enumeration.
@Bilge Bilge force-pushed the caching-connector-decorator branch from 7800193 to e754328 Compare October 25, 2017 04:18
@codecov-io
Copy link

codecov-io commented Oct 25, 2017

Codecov Report

Merging #44 into connection-context will increase coverage by 0.25%.
The diff coverage is 100%.

Impacted file tree graph

@@                 Coverage Diff                  @@
##           connection-context    #44      +/-   ##
====================================================
+ Coverage               99.74%   100%   +0.25%     
====================================================
  Files                      29     29              
  Lines                     391    372      -19     
====================================================
- Hits                      390    372      -18     
+ Misses                      1      0       -1
Impacted Files Coverage Δ
src/Connector/ImportConnector.php 100% <100%> (ø)
src/Cache/JsonCacheKeyGenerator.php 100% <100%> (ø) ⬆️
src/Connector/ConnectionContext.php 100% <100%> (ø) ⬆️
src/Cache/CacheUnavailableException.php 100% <100%> (ø) ⬆️
src/Provider/Resource/StaticResource.php 100% <100%> (ø) ⬆️
src/Porter.php 100% <100%> (ø) ⬆️
src/Specification/ImportSpecification.php 100% <100%> (ø) ⬆️
src/Connector/CachingConnector.php 100% <100%> (ø) ⬆️
src/Connector/ConnectionContextFactory.php 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5800e70...45bbb18. Read the comment docs.

Added test for ImportSpecification::disableCache() to complete code coverage.
@Bilge Bilge force-pushed the caching-connector-decorator branch from 8a63cb9 to 45bbb18 Compare October 25, 2017 15:24
@Bilge
Copy link
Member Author

Bilge commented Apr 9, 2018

Included in #46.

@Bilge Bilge closed this Apr 9, 2018
@Bilge Bilge deleted the caching-connector-decorator branch April 9, 2018 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants