• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Hashcode/ETag for EOs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hashcode/ETag for EOs


  • Subject: Re: Hashcode/ETag for EOs
  • From: Jean-Francois Veillette <email@hidden>
  • Date: Wed, 25 May 2011 14:03:51 -0400

Le 2011-05-25 à 13:55, Pascal Robert a écrit :

> I'm trying to find a way to generate a HTTP ETag for EOs so that caching can be done for REST services. What I want to do is to have the same ETag value for each representation of the EO, so when one of the values change, the ETag value will also change, but if the EO have the same value, it will generate the same ETag as another request got.
>
> Problem is: I don't know what to use. I tried with myEO.hashCode() but I did some tests and every time I fetch the EO, the hashcode is different even if the data didn't change. I'm thinking of doing a MD5 digest of part of the EO, but I was wondering if another way exist?

myEO.snapshotDictionary().hashCode() ?
That would be based on the attributes values only.
hmmm ... not sure how it would deal with relationship though (with regards to faulting).


> I could use a "last modified" date and generate a MD5 of that too, but that date is a better option for the Last-Modified header.


jfv

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Hashcode/ETag for EOs
      • From: Mike Schrag <email@hidden>
References: 
 >Hashcode/ETag for EOs (From: Pascal Robert <email@hidden>)

  • Prev by Date: Re: Hashcode/ETag for EOs
  • Next by Date: Re: Hashcode/ETag for EOs
  • Previous by thread: Re: Hashcode/ETag for EOs
  • Next by thread: Re: Hashcode/ETag for EOs
  • Index(es):
    • Date
    • Thread