Class: FastExists::MultiTenant::KeyLayout
- Inherits:
-
Object
- Object
- FastExists::MultiTenant::KeyLayout
- Defined in:
- lib/fast_exists/multi_tenant/key_layout.rb
Class Method Summary collapse
- .global_key(prefix = FastExists.configuration.key_prefix) ⇒ Object
- .pool_key(pool_name, prefix = FastExists.configuration.key_prefix) ⇒ Object
- .tenant_key(tenant_id, prefix = FastExists.configuration.key_prefix) ⇒ Object
Class Method Details
.global_key(prefix = FastExists.configuration.key_prefix) ⇒ Object
6 7 8 |
# File 'lib/fast_exists/multi_tenant/key_layout.rb', line 6 def self.global_key(prefix = FastExists.configuration.key_prefix) "#{prefix}:global" end |
.pool_key(pool_name, prefix = FastExists.configuration.key_prefix) ⇒ Object
10 11 12 |
# File 'lib/fast_exists/multi_tenant/key_layout.rb', line 10 def self.pool_key(pool_name, prefix = FastExists.configuration.key_prefix) "#{prefix}:pool:#{pool_name}" end |
.tenant_key(tenant_id, prefix = FastExists.configuration.key_prefix) ⇒ Object
14 15 16 |
# File 'lib/fast_exists/multi_tenant/key_layout.rb', line 14 def self.tenant_key(tenant_id, prefix = FastExists.configuration.key_prefix) "#{prefix}:tenant:#{tenant_id}" end |