I use java memcache api to store not persistent data associated with the user. Every user has associated memcache entity storing some properties, some of the properties are embedded entities. After a while they dissappear while other properties ( String, Integer, Boolean ) persist. Is it intended to be so or I am missing something in my code? Can I rely on entitites stored in cache at least for an hour or something like this? I see this behaviour when debugging on local machine with google plugin. My code is like this:
class UserData {
public Entity getEntity() {
Entity ret = new Entity( "User", key );
ret.setProperty( "property1", _integerval );
ret.setProperty( "property2", _stringval );
ret.setProperty( "property3", _complex.getEmbEntity() );
return ret;
}
public static UserData fromEntity( Entity ent ) {
UserData ret = new UserData();
ret._integerval = (Integer)ent.getProperty("property1");
ret._stringval = (String)ent.getProperty("property2");
ret._complex.fromEmbEntity( (EmbeddedEntity)ent.getProperty("property3") );
return ret;
}
}