I've got a widget with some user editable variables that will only very rarely be updated (likely only when the user sets up the widget).
Rather than hitting the database, I cache the widget user variables via memcache. The widget content is changing regularly.
I have it set-up so that when the user is creating or editing their widget the widget has a &noCache parameter which avoids the cached content and shows them the most recent version of the widget.
The concern is that the user is going to take the widget variables (including the noCache) and stick that into a page somewhere, thereby completely ignoring the cache.
I was thinking of adding a component which checks the users login, and if the login user matches the widget owner, then don't use the cache. However, that means I'm checking for a user session every time the widget is loaded, and that probably isn't what I want to do.
Any other suggestions on how to do this efficiently?
99.999999% of widget viewers won't be logged in, so i'm trying to add the least overhead to this.