package cs263w16;
import java.io.IOException;
import java.util.Date;
import javax.servlet.*;
import javax.servlet.http.*;
import com.google.appengine.api.datastore.*;

//The Worker servlet is mapped to the "/worker" route.
public class Worker extends HttpServlet {
 protected void doPost(HttpServletRequest request, HttpServletResponse response)
         throws ServletException, IOException {
         
     DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
     String value = request.getParameter("value");
     String name = request.getParameter("keyname");
     Entity tsk = new Entity("TaskData",name);
     tsk.setProperty("value", value);
     tsk.setProperty("date", new Date());
     datastore.put(tsk);
     System.err.println("****************Wrote key/value to datastore: "+ name + " " +value);

 }
}


@@ -159,16 +159,60 @@
 store.*;
+%0Aimport com.google.appengine.api.memcache.*;
 %0A%0A//The 
@@ -777,16 +777,138 @@
 t(tsk);%0A
+     //and cache it%0A     MemcacheService mcache = MemcacheServiceFactory.getMemcacheService();%0A     mcache.put(name,tsk);%0A
      Sys

step 7