> Hi,
>
> Intuitively, "set" must always set the value, while "update" - only
> updates existing
> entry (if it exists), but current behavior is exactly the opposite.
>
> Currently, cache_set() in psgi just calls uwsgi_cache_set2() with no
> flags set,
> and this leads to counter-intuitive result - if key is already in the
> cache,
> it will be untouched.
>
> On the other hand, cache_update() (if it would exist in psgi and set
> update flag),
> will always set the key - regardless of its existence (assuming that
> flag is set).
>
> Is this intentional behavior?
>
> --
> Best regards,
> Alexander.
>

Hi, yes, this is how it works in the other plugins. Honestly it could not
be the best choice but we always prefer to not change default behaviour
without deprecation phases. By the way, while the c api is "strict" and we
tend to not change it, you are free to propose new functions for the
language-specific api (like a cache_set_force).

As an example the sharedarea api in the psgi plugin has way more features
than the python one.

-- 
Roberto De Ioris
http://unbit.com
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to