Cache bugs are often not bugs at all. They are contracts we forgot to read. This tutorial walks through Quarkus cache failure semantics with a small pricing service: - `@CacheResult` on `Uni` - resolved-value caching - success-only `@CacheInvalidateAll` - stale data after failed methods with surviving side effects - forced invalidation with `CacheManager` The practical question is simple: when is stale data better than a cache miss, and when is it dangerous? https://lnkd.in/dShFxDDQ #Quarkus #Java #Caching #ReactiveJava
Markus Eisele’s Post
More Relevant Posts
-
Day 84 - Binary Tree Right Side View Computed the visible nodes when viewing a binary tree from the right side. Approach: • Use level order traversal (BFS) • Process nodes level by level • Add the last node of each level to the result Key Idea: The rightmost node at each level is the visible one Time Complexity: O(n) Space Complexity: O(n) #Day84 #LeetCode #BinaryTree #BFS #DSA #Java #CodingJourney
To view or add a comment, sign in
-
-
Spring Boot Circular Proxy Issue — Advanced trap 🤯 Even if you FIX circular dependency… Spring may still create proxies internally. 👉 This can lead to: ❌ Unexpected behavior ❌ Method not executing correctly 💡 Why? Spring uses AOP proxies (JDK / CGLIB) ⚠️ Problem: Internal method calls bypass proxy Example: Method A → calls Method B internally 👉 AOP (like @Transactional) won’t apply 🔥 Solution: ✔ Move logic to another bean ✔ Avoid internal method calls 👉 This is why some transactions “don’t work” Understanding proxies = senior-level Spring knowledge 💯 #SpringBoot #Java #AOP
To view or add a comment, sign in
-
🚀𝐃𝐚𝐲 88/100 – 𝐀𝐝𝐝 𝐁𝐢𝐧𝐚𝐫𝐲 Today’s problem was Add Binary — a great exercise to understand how addition works at the binary level. 🔍 𝐊𝐞𝐲 𝐋𝐞𝐚𝐫𝐧𝐢𝐧𝐠: Just like decimal addition, binary addition also uses a carry, but with base 2. 💡 𝐂𝐨𝐫𝐞 𝐈𝐝𝐞𝐚: Traverse both strings from right to left Add digits along with carry Append result and update carry 𝐖𝐡𝐲 𝐢𝐭 𝐰𝐨𝐫𝐤𝐬? Binary addition rules: 0 + 0 = 0 1 + 0 = 1 1 + 1 = 0 (carry 1) ⚡ 𝐀𝐩𝐩𝐫𝐨𝐚𝐜𝐡: Use two pointers (end of both strings) Add digits + carry Append (sum % 2) Update carry (sum / 2) Reverse the result ⏱️ 𝐓𝐢𝐦𝐞 𝐂𝐨𝐦𝐩𝐥𝐞𝐱𝐢𝐭𝐲: 𝐎(𝐦𝐚𝐱(𝐧, 𝐦)) 📦 𝐒𝐩𝐚𝐜𝐞 𝐂𝐨𝐦𝐩𝐥𝐞𝐱𝐢𝐭𝐲: 𝐎(𝐧) #Day88 #100DaysOfCode #Java #DSA #LeetCode #Strings #CodingJourney
To view or add a comment, sign in
-
-
Most Java performance issues don’t show up in code reviews They show up in object lifetimes. Two pieces of code can look identical: same logic same complexity same output But behave completely differently in production. Why? Because of how long objects live. Example patterns: creating objects inside tight loops → short-lived → frequent GC holding references longer than needed → objects move to old gen caching “just in case” → memory pressure builds silently Nothing looks wrong in the code. But at runtime: GC frequency increases pause times grow latency becomes unpredictable And the worst part? 👉 It doesn’t fail immediately. 👉 It degrades slowly. This is why some systems: pass load tests work fine initially then become unstable weeks later Takeaway: In Java, performance isn’t just about what you do. It’s about how long your data stays alive while doing it. #Java #JVM #Performance #Backend #SoftwareEngineering
To view or add a comment, sign in
-
#Post7 In the previous post, we saw how to handle exceptions globally using @ControllerAdvice. Now let’s take it one step further 👇 How do we handle specific errors properly? That’s where Custom Exceptions come in 🔥 Instead of using generic exceptions, we can create our own exception based on the use case. Example: public class UserNotFoundException extends RuntimeException { public UserNotFoundException(String message) { super(message); } } 👉 Now we can throw this exception when user is not found Example usage: if(user == null){ throw new UserNotFoundException("User not found"); } 💡 Why use Custom Exceptions? • Better error clarity • Easy debugging • More control over API responses Key takeaway: Use custom exceptions to make your API errors more meaningful and structured 👍 In the next post, we will understand validation using @Valid 🔥 #Java #SpringBoot #BackendDevelopment #RESTAPI #LearnInPublic
To view or add a comment, sign in
-
Day 73/100 Logging (Very Important) 📝 Today I focused on something that often gets ignored but is critical in real-world applications — logging. Learned: Why logging is important for debugging and monitoring applications Different log levels and when to use them (INFO, WARN, ERROR) Key takeaway: Logs are not just for debugging, they help understand what’s happening inside the application without stopping it. Starting to realize that good logging is a must for building reliable backend systems. #BackendDevelopment #Java #Logging #LearningInPublic #100DaysOfCode
To view or add a comment, sign in
-
-
Day 78 - Binary Tree Level Order Traversal Implemented level-by-level traversal of a binary tree using a queue (BFS). Approach: • Use a queue to process nodes • Traverse level by level • Track size of each level • Store values accordingly Time Complexity: O(n) Space Complexity: O(n) #Day78 #LeetCode #BinaryTree #DSA #Java #CodingJourney #ProblemSolving
To view or add a comment, sign in
-
-
🚀 Day 17/30 – LeetCode Java Challenge Back to a cleaner problem today — focused on tracking indices and minimizing distance. 📊 Result: ✔️ Accepted (899/899 test cases) ⚡ Runtime: 4 ms 💾 Memory: Could be improved 💡 What I learned: HashMaps are useful, but not always the most optimal choice Storing unnecessary data increases memory usage There’s often a simpler approach if you think deeper Let’s be honest: This solution works, but it’s not the most efficient in terms of memory. There’s a better way without storing full lists. Day 17 done. More focus on optimizing space, not just time. Bavani k Deepika Kannan Divya Suresh Hari priya B Devipriya R Archana J E Bhavya B Harini B Kezia H Vaishnavi Janaki #LeetCode #Java #DSA #ProblemSolving #Consistency #30DaysOfCode
To view or add a comment, sign in
-
-
🎉🎉 Day-38 of #60DaysOfDSA 🎉🎉 Problem: Row with Maximum 1s 👉 Problem Statement: Given a 2D binary matrix (rows sorted), find the index of the row having the maximum number of 1s. 👉 Approach Used: ✔️ Traverse each row ✔️ Find first occurrence of 1 ✔️ Count number of 1s → (m - j) ✔️ Track row with maximum count 👉Time Complexity: O(n * m) #geekstreak60 #dsa #java #problemsolving
To view or add a comment, sign in
-
-
Day 82 – Univalued Binary Tree Solved a problem to determine whether all nodes in a binary tree have the same value using depth-first traversal. Key Learnings: Applied DFS recursion to traverse all nodes in the tree Compared each node’s value with the root value for validation #DSA #Java #BinaryTree #DFS #Recursion #ProblemSolving #CodingPractice
To view or add a comment, sign in
-
More from this author
-
The Main Thread Weekly, CW 13: Testing MCP Servers, Taming Kubernetes, and Making Java Systems Agent-Ready
Markus Eisele 1mo -
The Main Thread Weekly, CW 12 / 2026 - Performance, identity, and shipping real tools
Markus Eisele 1mo -
Platforms, safety nets, and the quiet details that keep systems alive - CW 11
Markus Eisele 1mo
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development