Not all single doctypes are settings, so this is better. Implicit
caching is fine, same is done for `db` APIs on singles. We *should* aim
for 100% correctness of caching implementation, especially for singles.
Thanks to @netchampfaris for the suggestion.
* feat: get_settings
get_cached_value doesn't work well with singles because you either need
to pass `None` or repeat doctype name... both are awekward and easy to
shoot yourself in foot with.
* refactor: Use cached settings
creating the option to give the email an importance.
1 = Highest, 3 = Normal, 5 = Lowest
commonly used to flag the importance of emails
Co-authored-by: Jan Lukas Liesen <=>
* feat: mysqlclient
* fix: update error attrs
* fix: decode mogrified query to unicode
* fix: do some cleanup
* chore: disable cleanup for now
* fix: remove unnecessary call to as_unicode
* test: skip perf test for now
* fix: fallback to empty str
* fix: unbuffered cursor support
* fix: update converters and other changes
* fix: add cleanup back
* perf: improve timedelta converter
* fix: dont attempt to run query when explain flag is set
* test: cleanup tests
* chore: remove commented code
* perf: store conf as local var
* chore: ensure sequence
---------
Co-authored-by: Ankush Menat <ankush@frappe.io>
first check if chrome_pdf_generator is available in form_dict.
if not available which can happen if function is called from other places then set value from args or print_format.
- fixed chrome_pdf_backend arg by making it int and using it to properly override which pdf generator (chrome / wkhtmltopdf) to use.
- renamed new_pdf_backend to chrome_pdf_backend.
- added chrome_pdf_backend arg in local.from_dict to avoid passing it 4-5 functions deep
- added flag to read_file to return base64 encoded string
- fixed pdf_header_footer_chrome to remove unused subst function call
- added new_pdf_backend flag to get_print_format_template function
* refactor: Trim `__init__.py`
We strayed from the goal here: https://github.com/frappe/frappe/pull/29181
So making up for it.
* chore!: Delete unused get_version
Not used anywhere
* refactor: move few more functions to relevant place
* asd
* perf: faster `LocalProxy`
* refactor: use callable style local
* test: add some tests for local proxy override
---------
Co-authored-by: Ankush Menat <ankush@frappe.io>
* perf: Reduce penalty for lack of redis connection
If redis isn't running than this client cache is slower than default
implementation because of the extra locking overhead.
* test: update perf redis counts
* perf: cache table columns in client-cache
* fix: race condition on cache-client_cache init
Rare but apparant in synthetic benchmarks.
Cache is set but client cache is still being initialized then request
will fail.
* perf: Don't run notifications when loading document
WHAT?
* fix: use cached doc to repopulate
* perf: reduce get_meta calls