开发者

GAE Datastore - Reduce Cursor String (base 64) Length

开发者 https://www.devze.com 2023-01-12 02:58 出处:网络
Currently, I\'m when passing around a cursor s开发者_Go百科tring in a URL, and it looks very ugly. I was wondering if there was a way to shorten these? I was thinking I could encode it & decode it

Currently, I'm when passing around a cursor s开发者_Go百科tring in a URL, and it looks very ugly. I was wondering if there was a way to shorten these? I was thinking I could encode it & decode it somehow, but I don't really know where to start looking for information on this.

The cursor string is a base 64 encoded string. Any way to shorten it without loosing any data?


I dont think there would be an easier way to shorten and again retrieve back the exact string.

I would suggest you to maintain your own mapping of shortened string to original string in the backend preferably using memcache.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号