Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

  • DSResponse.invalidateCache limited to some operationTypes only?

    Hi Isomorphic,

    the DSResponse client and server docs as well as the ResultSet don't say anything about it, but to me it seems that invalidateCache:true is only respected on UPDATE-Responses.
    Perhaps also for some other, but not for operationType:"CUSTOM" ones.
    I had a problem here with a Response on a custom operation where I did set this flag. This did not result in any action client side. Including a relatedUpdate for a (fake) update with the flag did the job.

    Is this on purpose or a bug? If on purpose, could you mention this in the docs I linked?

    Using latest 12.0p.

    Thank you & Best regards
    Blama

  • #2
    This is on purpose, as operationType:custom is not constrained to even operate on data that is a set of DataSource records, so it is not expected to have any impact on record caching. Doing a relatedUpdate is the correct way of influencing record caching, if needed.

    Comment


    • #3
      Hi Isomorphic,

      thanks, that makes sense to me.
      I believe you also updated the server side docs of DSResponse.setInvalidateCache() to include
      If you set invalidateCache to an update operation, a new cache will be requested by the ResultSet.
      Does this really only apply to update, meaning DataSource.OP_UPDATE, or is it meant to apply to all write-operations, also including ADD and REMOVE?

      Best regards
      Blama

      Comment

      Working...
      X