DirectCacheRead

Step that attempts to read from cache without using any N1QL or indexes

Added in version 1.0.0.

  • Friendly name: Deprecated: Direct Cache Read

  • Step class: base_steps_syncpack.steps.DirectCacheRead.DirectCacheRead

  • Step version: 1.0.2

  • Required parameters: save_key, lookup_type

Parameters

Name

Type

Required

Default

Description

save_key

string

yes

–

The key with which to read from the cache Example: keyA

lookup_type

enum

yes

like

How to perform the search from cache. Can either be ‘equals’, or ‘like’

merge_results

boolean

no

True

Try to combine the results into a single list

default_value

string

no

–

Value to return if None Example: True

Every step also accepts the platform parameters common to all steps – see Platform parameters.

Dependencies

  • Inherits from: DirectCacheRead -> BaseStep -> Serializable

  • External packages: couchbase, ipaascommon, ipaascore

Warning

Deprecated — use ReadFromCache. See Deprecated steps.

Behaviour

Reads the cache by direct key access only, with no N1QL query and no index lookup: it fetches save_key, then save_key::1 through save_key::1000, stopping at the first missing batch. Batch reads are wrapped with @retry(HTTPException, tries=3).

That “stop at the first gap” behaviour is the reason to prefer ReadFromCache, which resolves the real key set instead of guessing at a numbering scheme.

Outputs

Same shape as ReadFromCache: merged into one structure when merge_results is true, otherwise a list per key; default_value or [] when nothing is found.

Notes

  • lookup_type is declared but unused. Setting it to equals changes nothing — reads are always direct key iteration.

  • The chunk scan stops at 1000, so data chunked beyond that is silently truncated rather than reported.

API

class base_steps_syncpack.steps.DirectCacheRead.DirectCacheRead

Bases: BaseStep

execute()

All logic main logic for executing the step happens here

Returns:

get_cache_data_with_keys()

Return a list of teh contents for each id queried

Parameters:

id_list (list) – ids to query for

Returns list: