-
-
Notifications
You must be signed in to change notification settings - Fork 100
Redis cache backend #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redis cache backend #116
Conversation
* Contains updated CMake file with option to configure using hiredis official C redis library. * Contains update configuration parse and mapcache.h file to add support for redis cache. * Add lib/cache_redis.c file with preliminary redis support.
* In cmake/FindRedis.cmake remove duplicate lines.
* Add an example redis config the XML config sample file.
* Move expiration time before data segment in SETEX call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mapcache_cache cache; MUST be the first member of the mapcache_cache_redis struct as that's how structure inheritance is performed. I'm actually quite surprised that you got anything working without this...?
|
thanks for the contribution! I currently don't have the time to fully review, test and apply, but I'll get back to you once I can (not before second half of January). Please do continue working on this if needed as this is definitely a cache backend I'd like to see incorporated. thomas |
|
@tbonfort Thanks! Modified the code as you specified and am currently in the process of more thorough testing. Just update this pull request when you've done your review and I'll come back to discuss :) |
* Use correct error-handling as specified in the strtoul manpages.
|
Also, as an update, I've made several fixes and this his now been verified working against the demo. |
|
Looks pretty cool - might give it a whirl here! |
|
@sdlime Please do! I think there's likely a lot of room for improvement and I'd love any feedback I can get :) |
|
my etscrivner-add-redis-cache branch contains an updated version of this PR with support for the connection pooling that was introduced in branch-1-4, along with some minor fixups. Please give it a try and report back so we can add this to the next release. |
|
@etscrivner any chance you're going to be able to test this? |
|
@tbonfort I thoroughly tested the previous version (without connection pooling) on our production system. If you'd like I can do the same with the connection-pooled version as I have time? I'd probably get to it next week some time. |
|
@etscrivner that would be great. I'll merge into master once you give the go, no hurry though |
|
this looks like a great feature, any update on this? |
|
I'm interested in this feature as well. Is there anything specific holding it back? |
|
@pcallewaert @tablet-mode If either of you are willing to fix those and re-test could probably get this off the ground fairly quickly. |
|
@etscrivner, @tbonfort, @sdlime, @pcallewaert, @t4k1t, Anyone willing to work on this? |
I'm afraid not. I haven't been with the company interested in this for a few years now. |
This pull request adds Redis as an optional cache backend.
Explanation:
The organization I work for (ParkMe) currently uses the mapserver with the memcached backend to render parking location information. Recent updates to our infrastructure have led to a roadmap in which we phase out memcached in favor of redis. This is a provisional take at implementing a mapserver cache backend for redis that is production-ready.