Skip to content

Commit

Permalink
Issue wocommunity#615 fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Farrukh Ijaz committed Nov 7, 2014
1 parent 8da33bd commit 5798292
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public class ERXCachingWrapper extends ERXStatelessComponent {

@Override
public Object get(Object key) {
Entry result = (Entry) super.get(key);
CacheEntry result = (CacheEntry) super.get(key);
if(result != null) {
if(!result.isActive()) {
remove(key);
Expand All @@ -78,7 +78,7 @@ public Object get(Object key) {
});

/** Simply cache entry class. It caches a string for a duration and can replace the session ID on retrieval. */
protected static class Entry implements Serializable{
protected static class CacheEntry implements Serializable{
/**
* Do I need to update serialVersionUID?
* See section 5.6 <cite>Type Changes Affecting Serialization</cite> on page 51 of the
Expand All @@ -91,7 +91,7 @@ protected static class Entry implements Serializable{
private String content;
private String sessionID;

public Entry(String aContent, long aDuration, String aSessionID) {
public CacheEntry(String aContent, long aDuration, String aSessionID) {
insertTime = System.currentTimeMillis();
content = aContent;
duration = aDuration;
Expand All @@ -113,7 +113,7 @@ public String content(WOContext arg1) {
protected NSArray keys;
protected String entryName;
protected Long cacheDuration;
protected Entry entry;
protected CacheEntry entry;
protected NSDictionary values;

/**
Expand All @@ -131,7 +131,7 @@ public void awake() {
entryName = null;
cacheDuration = null;
values = null;
entry = (Entry) cache.get(values());
entry = (CacheEntry) cache.get(values());
}

protected NSArray keys() {
Expand Down Expand Up @@ -241,7 +241,7 @@ public void appendToResponse(WOResponse response, WOContext context) {
newResponse.setUserInfo(response.userInfo());
super.appendToResponse(newResponse, context);
String content = newResponse.contentString();
entry = new Entry(content, cacheDuration(), (context.hasSession() ? context.session().sessionID() : null));
entry = new CacheEntry(content, cacheDuration(), (context.hasSession() ? context.session().sessionID() : null));
cache.put(values(), entry);
}
String content = entry.content(context);
Expand Down

0 comments on commit 5798292

Please sign in to comment.