Class: Parse::CLPScope::CacheEntry
- Inherits:
-
Struct
- Object
- Struct
- Parse::CLPScope::CacheEntry
- Defined in:
- lib/parse/clp_scope.rb
Overview
Cache-entry shape. kind: is the disposition of the most recent
schema-fetch attempt:
:cached_clp— schema fetch succeeded and returned a non-emptyclassLevelPermissionsmap. permits? evaluates against it.:no_clp— schema fetch succeeded but the class has no CLP configured (or it's an empty hash). Parse Server treats this as public-default, so permits? returns true for all operations.:unresolvable— schema fetch FAILED (network error, 5xx, unexpected exception, missing client). FAIL CLOSED: permits? returns false for every non-master query. Without this, a transient schema-endpoint outage would silently turn an admin-only class into public-readable for the duration of the outage — every mongo-direct caller was getting unfiltered rows becausepermits?returned true onentry.nil?.
fetched_at is a monotonic clock reading used by stale? so
the SDK isn't fooled by NTP adjustments.
clp is nil for :no_clp and :unresolvable; readers must
branch on kind before dereferencing.
Instance Attribute Summary collapse
-
#clp ⇒ Object
Returns the value of attribute clp.
-
#fetched_at ⇒ Object
Returns the value of attribute fetched_at.
-
#kind ⇒ Object
Returns the value of attribute kind.
Instance Attribute Details
#clp ⇒ Object
Returns the value of attribute clp
45 46 47 |
# File 'lib/parse/clp_scope.rb', line 45 def clp @clp end |
#fetched_at ⇒ Object
Returns the value of attribute fetched_at
45 46 47 |
# File 'lib/parse/clp_scope.rb', line 45 def fetched_at @fetched_at end |
#kind ⇒ Object
Returns the value of attribute kind
45 46 47 |
# File 'lib/parse/clp_scope.rb', line 45 def kind @kind end |