Skip to content

Feature: delegate ID #124

Open
Open
@lewispb

Description

@lewispb

Currently Kredis supports manually constructing a key, this is often required to capture the relationship between a user and an object:

class Widgets::Selection
  kredis_set :selected_widgets, typed: :integer, key: ->(selection) { "identity:#{selection.identity.id}:selected_widgets" }

  attr_accessor :identity
end

It'd be nice if Kredis supported this common scenario, generating an appropriately scoped key (useful for any future incineration):

class Widgets::Selection
  kredis_set :selected_widgets, typed: :integer, identified_by: :identity

  attr_accessor :identity
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions