Opened 12 years ago

Last modified 9 years ago

#11050 closed defect issue — at Version 2

Reported by: Jared Jurkiewicz Owned by: Shane O'Sullivan
Priority: high Milestone: 1.9
Component: Dojox Version: 1.4.0
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by Adam Peller)

Reported by Karl Bishop (IBM)

The DojoDoc? for:*string?*/namespace) states:

"Completely clears this storage system of all of it's [sic] values and keys. If 'namespace' is provided just clears the keys in that namespace."

This is incorrect based on the the implementations for WhatWG and Flash storage implementations. If the 'namespace' is not provided in the clear call, it does not purge storage of all values as stated, but only clears the storage for the "default" namespace.

I would like to say that the impls are incorrect and that proper behavior should purge all values from all namespaces as stated in the API doc. The only reason I'm raising this as a bug is that it caused a lot of pain and debugging to identify the root cause of of an issue due to this conflict form expected behavior.

Workaround is trivial:

dojo.forEach(, function(ns) {
    //console.debug(F, "Purging storage for namespace: ", ns); ns );
//-- This clear is not required as the internal default ns is purged above
//-- but is left here for completeness.
//console.debug(F, "Purging generic storage");;

Change History (2)

comment:1 Changed 12 years ago by Jared Jurkiewicz

Description: modified (diff)

comment:2 Changed 12 years ago by Adam Peller

Description: modified (diff)
Note: See TracTickets for help on using tickets.