Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-76

What is the difference between "expiresat" and "validfor"

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.1.6
    • Fix Version/s: None
    • Component/s: docs
    • Labels:
      None
    No reviews matched the request. Check your Options in the drop-down menu of this sections header.

      Activity

      Hide
      john John Zablocki (Inactive) added a comment -

      The method is overloaded to take a TimeSpan (validfor) or a DateTime (expiresAt). These are not the same pages.

      Show
      john John Zablocki (Inactive) added a comment - The method is overloaded to take a TimeSpan (validfor) or a DateTime (expiresAt). These are not the same pages.
      Hide
      perry Perry Krug added a comment -

      Interesting...

      Seems a bit bloated to me given that the underlying memcached protocol doesn't care either way, but as long as the docs match the code and make sense to the developer, I won't argue it further.

      Show
      perry Perry Krug added a comment - Interesting... Seems a bit bloated to me given that the underlying memcached protocol doesn't care either way, but as long as the docs match the code and make sense to the developer, I won't argue it further.
      Hide
      john John Zablocki (Inactive) added a comment -

      It's a common .NET pattern. A TimeSpan represents an interval of time, vs. an instance of time. So the subtle difference is that you're saying expire in 30 seconds vs. expire at the exact time which is 30 seconds from now. Under the hood, it's all treated the same - but a TimeSpan allows you to specify never-expire (i.e., TimeSpan.Zero). But you're correct that the value add is minimal.

      Show
      john John Zablocki (Inactive) added a comment - It's a common .NET pattern. A TimeSpan represents an interval of time, vs. an instance of time. So the subtle difference is that you're saying expire in 30 seconds vs. expire at the exact time which is 30 seconds from now. Under the hood, it's all treated the same - but a TimeSpan allows you to specify never-expire (i.e., TimeSpan.Zero). But you're correct that the value add is minimal.

        People

        • Assignee:
          john John Zablocki (Inactive)
          Reporter:
          perry Perry Krug
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Gerrit Reviews

            There are no open Gerrit changes