-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:Netflix/EVCache
- Loading branch information
Showing
5 changed files
with
182 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
REST API Service is for the clients that are Non-Java clients such as Python , JavaScript , Shell etc., and store key , value in memcached.Service supports basic REST (CRUD) Operations for evcache. | ||
|
||
PRE-REQUISTES: | ||
1. memcached must be deployed and running. | ||
|
||
Basic REST Operations : | ||
|
||
|
||
|
||
HTTP Method: GET | ||
URI : http://[hostname]/evcrest/v1.0/{cacheName}/{key} | ||
Action : Retrieve key value | ||
Response : 200 Success, 404 Not found | ||
|
||
HTTP Method: POST | ||
URI : http://[hostname]/evcrest/v1.0/{cacheName}/{key}?ttl=[ttl-for-key] | ||
Action : store key value in evcache ( binary) | ||
Response : 202 Success, 400 Bad Request | ||
|
||
HTTP Method: DELETE | ||
URI : http://[hostname]/evcrest/v1.0/{cacheName}/{key} | ||
Action : Delete key from cache | ||
Response : 200 Success | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
evcacheproxy/src/main/java/com/netflix/evcache/service/transcoder/RESTServiceTranscoder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.netflix.evcache.service.transcoder; | ||
|
||
import net.spy.memcached.CachedData; | ||
import net.spy.memcached.transcoders.Transcoder; | ||
|
||
/** | ||
* Created by senugula on 6/23/16. | ||
*/ | ||
public class RESTServiceTranscoder implements Transcoder<CachedData> { | ||
|
||
public RESTServiceTranscoder() { | ||
|
||
} | ||
|
||
public boolean asyncDecode(CachedData d) { | ||
return false; | ||
} | ||
|
||
public CachedData decode(CachedData d) { | ||
return d; | ||
} | ||
|
||
public CachedData encode(CachedData o) { | ||
return o; | ||
} | ||
|
||
public int getMaxSize() { | ||
return CachedData.MAX_SIZE; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters