JPA cache results in the inability to query to the updated data &android a solution to the ANR occurrence

Source: Internet
Author: User

1. After updating the records to the server query, always query the updated information

Can only be found before the update, it is immediately inferred that the problem of caching. Search on the Internet, the problem is targeted to the JPA cache, we want to set the JPA query is not taken from the cache, directly from the database, so that the query to ensure that the results are up-to-date, but performance may be affected. Reference: Https://en.wikibooks.org/wiki/Java_Persistence/Caching#JPA_2.0_Cache_APIs

If prompted, I can do the following settings on the RESTful server.

2. The Android app registration interface has a new ANR (application not responding) issue

The reason is that the regular expression for mailbox validation is too complex to write, and the school's mailbox is too long to make the verification operation time-consuming, which seems to be the problem in the case of the Android UI thread (the main thread) if there are any time-consuming and blocking operations. The workaround is simple: simplify the regular expression.

JPA cache results in the inability to query to the updated data &android a solution to the ANR occurrence

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.