Skip to content

FileStorage and (un)serialization #82

Description

@Ludoi

Would it be possible to enhance the FileStorage in a way that instead of direct usage of functions serialize and unserialize it uses some protected methods which would allow to inherit from the class and only change the way how the serialization/unserialization is done?

I.e. currently I use PECL igbinary_serialize/igbinary_unserialize as it seems to be more effective than PHPs own serialize/unserialize. I created my own storage by copying the FileStorage and exchanged the functions, but it would be much nicer to just inherit from FileStorage and redefine the serialize/unserialize methods.

Thank you.

Just FYI - Nette.Database.Structure cached file was 380 kB using serialize, while it is 43 kB using igbinary_serialize.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions