Reputation: 2173
Using redis on laravel site I need to save some collections of data, based on provided filter. I use formatted string with filtered value as key. Such key :
filterPublished=1;filterTitle=a;sortByField=published;sortOrdering=desc;additiveSortByField=title;additiveSortOrdering=asc
is invalid
This key is valid:
fP=1;fT=a;sF=published;sO=desc;aSBF=title;aSO=asc
and collection of data with such key is successfully saved.
Actually
fT=filterTitle
I suppose that first key does not work as is it rather long(122 chars) But second key also can be invalid if key "fT" would have some long text. That is custom filter utility where user enters some values when searching for data.
Which is max length of such key? Is it restriction of redis or predis library ?
Are there better decisions/tools for such cases?
"laravel/framework": "^9.48.0", "predis/predis": "^2.1",
Thanks in advance!
Upvotes: 0
Views: 110