jcabi-http icon indicating copy to clipboard operation
jcabi-http copied to clipboard

Caching Implementation Inconsistencies

Open nnordrum opened this issue 5 years ago • 37 comments

There currently (that I'm aware of) isn't a way to externalize the cache to a Reddis/Cassandra/etc.

There are a number of caching wires that are unable to do the job:

  • AbstractHeaderBasedCachingWire.java: cache is a transient Map that isn't user replaceable
  • CachingWire.java: uses guava Map, so probably the closest, but not easy/documented how to do it
  • FcWire.java: cache root is a directory, and FcCache is final and not an Interface

All of these are close, but no cigar.

What I'm specifically trying to do is create a Wire (GitHubWire.java) that supports a pluggable cache and supports ETag. AbstractHeaderBasedCachingWire.java would be perfect if I could just swap out the caching implementation...

nnordrum avatar Mar 25 '19 20:03 nnordrum

@yegor256/z please, pay attention to this issue

0crat avatar Mar 25 '19 20:03 0crat

@nnordrum/z this project will fix the problem faster if you donate a few dollars to it; just click here and pay via Stripe, it's very fast, convenient and appreciated; thanks a lot!

0crat avatar Mar 25 '19 20:03 0crat

I realize jcabi/jcabi-github may be the right place the this, but here had more wires.

nnordrum avatar Mar 25 '19 20:03 nnordrum

@nnordrum Would an extra constructor with Map parameter added in AbstractHeaderBasedCachingWire be enough? Note, only 4 Map methods are used by this class (put,get,remove, contains), so may be it should not be a Map. CachingWire keeps its cache it in static private variable, it could refactor in order to be used like .through(CachingWire.class, cache), though we would need an extract interface for this cache object.

andreoss avatar Jul 08 '20 02:07 andreoss

@yegor256/z everybody who has role DEV is banned at #179; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat avatar Jul 09 '20 04:07 0crat

@yegor256/z everybody who has role DEV is banned at #179; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat avatar Jul 14 '20 04:07 0crat

@yegor256/z everybody who has role DEV is banned at #179; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat avatar Jul 19 '20 05:07 0crat

@yegor256/z everybody who has role DEV is banned at #179; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat avatar Jul 24 '20 06:07 0crat

@yegor256/z everybody who has role DEV is banned at #179; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat avatar Jul 29 '20 14:07 0crat

@yegor256/z everybody who has role DEV is banned at #179; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat avatar Aug 03 '20 15:08 0crat

@yegor256/z everybody who has role DEV is banned at #179; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat avatar Aug 08 '20 16:08 0crat

@andreoss what's up with this ticket?

yegor256 avatar Aug 09 '20 06:08 yegor256

@yegor256/z everybody who has role DEV is banned at #179; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat avatar Aug 13 '20 17:08 0crat

@yegor256/z everybody who has role DEV is banned at #179; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat avatar Aug 18 '20 18:08 0crat

@yegor256 I would go with extra parameter to CachingWire, if you're okay with that https://github.com/jcabi/jcabi-http/issues/179#issuecomment-655242046

andreoss avatar Aug 22 '20 12:08 andreoss

@andreoss yes, it's fine

yegor256 avatar Aug 23 '20 05:08 yegor256

@yegor256/z everybody who has role DEV is banned at #179; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat avatar Aug 23 '20 19:08 0crat

@yegor256/z everybody who has role DEV is banned at #179; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat avatar Aug 28 '20 20:08 0crat

@yegor256/z everybody who has role DEV is banned at #179; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat avatar Sep 02 '20 21:09 0crat

@nnordrum the puzzle #222 is still not solved.

0pdd avatar Sep 03 '20 22:09 0pdd

@yegor256/z everybody who has role DEV is banned at #179; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat avatar Sep 07 '20 22:09 0crat

@yegor256/z everybody who has role DEV is banned at #179; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat avatar Sep 12 '20 23:09 0crat

@yegor256/z everybody who has role DEV is banned at #179; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat avatar Sep 18 '20 00:09 0crat

@yegor256/z everybody who has role DEV is banned at #179; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat avatar Sep 23 '20 01:09 0crat

@yegor256/z everybody who has role DEV is banned at #179; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat avatar Sep 28 '20 01:09 0crat

@yegor256/z everybody who has role DEV is banned at #179; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat avatar Oct 03 '20 02:10 0crat

@yegor256/z everybody who has role DEV is banned at #179; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat avatar Oct 08 '20 03:10 0crat

@yegor256/z everybody who has role DEV is banned at #179; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat avatar Oct 13 '20 04:10 0crat

@yegor256/z everybody who has role DEV is banned at #179; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat avatar Oct 18 '20 05:10 0crat

@yegor256/z everybody who has role DEV is banned at #179; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat avatar Oct 23 '20 05:10 0crat