silvershop-core
silvershop-core copied to clipboard
Hash value for comparing complex cart items
Rather than using the MatchObjectFilter to find items of the same time in a cart, it might be better to introduce some kind of hashing function that can be used to compare new order items with those in the cart.
Should be much less complex than MatchObjectFilter, and hopefully doesn't affect performance....just find a fast perfect hash function.
http://stackoverflow.com/questions/2351087/what-is-the-best-32bit-hash-function-for-short-strings-tag-names
Is this a good idea? It will still require a database call to retrieve cart items.