Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for pickle content #987

Closed
SachiaLanlus opened this issue Oct 27, 2022 · 5 comments
Closed

Support for pickle content #987

SachiaLanlus opened this issue Oct 27, 2022 · 5 comments

Comments

@SachiaLanlus
Copy link

OS

Mac

VERSION

1.5.8

ISSUE DESCRIPTION

Is there any plan to support pickle format of cache body?
Currently, the pickled content will be displayed as Hex format,
which is not human readable.
So I would like to ask if there is a way to display pickled content correctly like redis-desktop-manager does, or have a plan to support this in the future?

@qishibo
Copy link
Owner

qishibo commented Oct 27, 2022

sounds great

@SachiaLanlus
Copy link
Author

I have workaround this by a custom python script...
It it much easier than I thought~
But the UI layout is not that smooth as native data type.
And can not choose the default data type for a whole redis tab.
So I have to select the "Pickle" data type every time I choose a redis cache record.
It is a little bit annoying.

@qishibo
Copy link
Owner

qishibo commented Oct 28, 2022

yeap, now the custom viewer won't change automatically, you must change it manually every time, this is a point to be improved.

@SachiaLanlus
Copy link
Author

Here is my custom pickle content viewer code.
For anyone who is interested.

#!/Library/Frameworks/Python.framework/Versions/3.10/bin/python3

import pickle
import sys

if __name__ == '__main__':
    argv = sys.argv
    if len(argv) <= 1:
        print('Pass the pickle content as the first paramater.')
    else:
        print(pickle.loads(bytes.fromhex(argv[1])))

@qishibo qishibo closed this as completed in 99f9f2f Feb 3, 2024
@qishibo
Copy link
Owner

qishibo commented Feb 3, 2024

done
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants