Hi, Memcache is a cache, so you should not depend on it being there. If you need something persisted, you will need to write it to the datastore. You can stick it in memcache at write time, which will help your reads though.
Robert On Wed, Apr 18, 2012 at 02:36, cloudpre <[email protected]> wrote: > Jeff - thanks for the note. I have been trying to add few items in > memcache manually. > > Can put operations also be saved? Let's say I am updating the same > query again after few seconds. > > Does it work flawlessly in the production? The last thing I want to > see is our thousands of customers coming back and complaining. > > Cheers. > > On Apr 18, 12:17 am, Jeff Schnitzer <[email protected]> wrote: >> Get-by-key is a read operation, not a small operation. Small >> operations are things like count() index walks and keys-only queries >> (although there is still 1 read operation per query). >> >> Most read-heavy apps can benefit significantly from memcache. If >> you're using the low-level api, try this: >> >> http://code.google.com/p/objectify-appengine/wiki/MemcacheStandalone >> >> Jeff >> >> >> >> On Wed, Apr 18, 2012 at 2:27 AM, cloudpre <[email protected]> wrote: >> > Hi >> >> > We have a pretty big app which has not been optimized till date. We >> > spend over $40/day just on the reads. >> >> > This is our current stats >> >> > Datastore Read Operations 46.74 Million Ops 46.69 >> > $0.70/ Million >> > Ops $32.69 >> > Datastore Small Operations 0.00 Million Ops 0.00 >> > $0.10/ Million >> > Ops $0.00 >> >> > I have been reading that small operations are much cheaper and they >> > are done based on key. >> >> > The following function is used at many places - but I do not see >> > counter moving from zero for small operations. >> >> > Is datastore.get(key) a small operation? If not, what should I change >> > the function to make it count towards small operations. >> >> > Thanks. >> >> > // Get Entity >> > public static Entity getEntityFromId(String entityName, String id) >> > { >> > // Get Datastore >> > DatastoreService datastore = >> > DatastoreServiceFactory.getDatastoreService(); >> >> > // Get Entity >> > try >> > { >> > Key key = KeyFactory.stringToKey(id); >> > return datastore.get(key); >> > } catch (Exception e) >> > { >> > return null; >> > } >> > } >> >> > -- >> > You received this message because you are subscribed to the Google Groups >> > "Google App Engine" group. >> > To post to this group, send email to [email protected]. >> > To unsubscribe from this group, send email to >> > [email protected]. >> > For more options, visit this group >> > athttp://groups.google.com/group/google-appengine?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
