946
edits
Changes
→createRecord
=== createRecord ===
The <tt>createRecord( guid , cryptoMetaURL )</tt> method gets called by the engine to request a new record for an item with a given GUID. The cryptoMetaURL is the URL to the location of the cryptoMeta record that will be used to encrypt it.
It's your Store's responsibility to instantiate a Record object (of the class you defined earlier), assign the given GUID and cryptoMetaURL to it, and return it.
It's also strongly recommended that your Store cache the record object. The base class provides the cache, so you can store a record in it like so:
// ...
record.id = guid;
record.encryption = cryptoMetaURL;
return record;