Commit Graph

14 Commits

Author SHA1 Message Date
jibees
6dcc50ad15 Revert "Cache address JSON to avoid database queries" 2022-11-15 10:40:22 +01:00
Maikel Linke
118c1f7cbd Cache address JSON to avoid database queries
We found that our database is quite busy querying the country all the
time. One source of these queries is the shop front which serializes
enterprises including their addresses. But addresses should be safe to
cache because:

- country records never change
- state records never change
- updating any other attribute changes the cache key

The caching was previously removed when the state_name attribute was
added. That is technically correct because it's possible to change a
state's name without updating the address. Then the cache would be out
of date. But we never update state names. And if we did, we would need
to invalidate the cache now.
2022-11-03 13:07:59 +11:00
Matt-Yorkley
1d5077061e Remove andand
This old gem implemented some functionality for handling nils which is no longer needed, as it's provided natively by Ruby with the &. operator.
2021-09-08 14:28:31 +01:00
Luis Ramos
e52937c113 Use rubocop auto correct to add frozen string literal to all files
This is an unsafe auto corection, we will need to trust our build here
2021-06-17 23:07:26 +01:00
luisramos0
6796d91a07 Add some basic attributes to address and order serializers that will be used in the order show api endpoint 2019-09-19 16:32:09 +01:00
luisramos0
86b0d71c7e Result of rubocop auto-correct and rebuilding rubocop_manual_todo 2019-05-28 12:57:29 +01:00
Rob Harrington
21d8aafd97 Using numbers for state and countries ids in AddressSerializer 2018-02-09 14:43:42 +11:00
Bing Xie
80d755da0d Convert state_id and country_id in serializer 2016-10-21 10:51:36 +11:00
Will Marshall
7ca618fb29 Moving to state_name 2014-07-31 15:38:26 +10:00
Will Marshall
001db8d07e Renaming to state_name 2014-07-30 17:09:31 +10:00
Will Marshall
547d9f9f5c Moving payment methods and shipping methods into their own services 2014-07-17 14:19:39 +10:00
Will Marshall
79f42ccc61 Temporary/demonstration caching behaviour, INCOMPLETE 2014-07-04 13:51:22 +10:00
Will Marshall
8862fd555c Removing ng-animate, changing our enterprise restriction 2014-06-26 14:36:16 +10:00
Will Marshall
9667b84c5c Finishing the transition to AMS from RABL 2014-06-26 11:07:53 +10:00