[jQuery] data cache and tag attributes

[jQuery] data cache and tag attributes


Hi
I've been setting arbitrary attributes on my html tags, and using
jQuery to make AJAX requests based on their values. These has worked
well so far as writing out arbitrary attributes from the backend is
trivial.
But I'm about to start using per element attributes more intensively,
and now I'm questioning my approach. I'm aware that jQuery UI makes
heavy use of the data cache and I assume it does so with good reason.
At what point does it make more sense to use the data cache rather
than just set html attributes? I'm thinking when closures or rich
JavaScript objects are required? If my needs are met by key / value
pairs are there any downsides to arbitrary attributes that I should be
aware of?
Many thanks
Paul