RikudouSage / DynamoDbCachePsr6

PSR-6 and PSR-16 cache implementation using AWS DynamoDB
MIT License
6 stars 4 forks source link

Add ability to set SK and namespace #3

Open chekalsky opened 3 years ago

chekalsky commented 3 years ago

I think it would be helpful to have an ability to set SortKey for the table for projects made with single-table design principles.

In this case having prefix (e.g. RIKIDOUCACHE# or a custom one) would be a super helpful too (https://github.com/RikudouSage/DynamoDbCachePsr6Bundle/issues/6).

Single-table means structure like this: PK SK value ttl
RIKIDOUCACHE#key1 RIKIDOUCACHE#key1 value1 0
RIKIDOUCACHE#key2 RIKIDOUCACHE#key2 value2 0
APP#user1 APP#user1 username1

If this case should be handled by Decorator from https://github.com/RikudouSage/DynamoDbCachePsr6Bundle/pull/7 then it would be helpful to have documented somewhere.

RikudouSage commented 3 years ago

The prefix is added, I will have to think a little more about how to implement the sort key.