I am in the middle of centralizing more HTTP specific caching knowledge - so that mod_disk/mem/file/memcached/distcache/et.al. do not all need to replicate this. Some quick guidance:

-       any religion on how we serialize tables throughout ?

        ->   mod_disk_cache -- while there is some binary
                we are fairly careful to write most things
                out with 'key' ':' 'value' CR LF (and sort of
                hope the key never has a ':'.

        ->   mod_memcached and lots of others do
                        'key' \0 'value' \0
                        ...
                        '\0'

        And the latter make it a superset of array serialization. I am tempted
        to go for the latter - and let it long term migrate into apr.

-       it is useful to store things like timestamps, expiredates - we now
        do this 'raw' in most modules.

        ->   wrap those in htonl/htons()

        ->   serialize them integers to ascii.

or is that generally felt as over the top ? I am tempted to do so - as the cost is very low - and it does help with distributed cased. But those who care the most about that are also the most likely to be careful about using
        the same endian/operating system throughout.

Feedback appreciated.

Thanks,

Dw

Reply via email to