{"id":21578408,"url":"https://github.com/lucasdiasjorge/spring-cache-implementation","last_synced_at":"2025-03-18T07:31:44.106Z","repository":{"id":263652484,"uuid":"867411690","full_name":"LucasDiasJorge/Spring-Cache-implementation","owner":"LucasDiasJorge","description":"Simplest caching implementation in Spring","archived":false,"fork":false,"pushed_at":"2024-11-19T17:16:38.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-24T14:17:30.837Z","etag":null,"topics":["backend","cache","optmization","spring-boot"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LucasDiasJorge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-04T02:42:17.000Z","updated_at":"2024-11-19T17:16:41.000Z","dependencies_parsed_at":"2024-11-19T18:27:38.803Z","dependency_job_id":"d3a87c67-141a-4c0f-a053-b4f860a62b7c","html_url":"https://github.com/LucasDiasJorge/Spring-Cache-implementation","commit_stats":null,"previous_names":["lucasdiasjorge/spring-cache-implementation"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucasDiasJorge%2FSpring-Cache-implementation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucasDiasJorge%2FSpring-Cache-implementation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucasDiasJorge%2FSpring-Cache-implementation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucasDiasJorge%2FSpring-Cache-implementation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LucasDiasJorge","download_url":"https://codeload.github.com/LucasDiasJorge/Spring-Cache-implementation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244177648,"owners_count":20410993,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend","cache","optmization","spring-boot"],"created_at":"2024-11-24T13:10:28.101Z","updated_at":"2025-03-18T07:31:44.088Z","avatar_url":"https://github.com/LucasDiasJorge.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Caching em Spring Boot\n\n## Descrição\n\nEste projeto demonstra como implementar caching em uma aplicação Spring Boot. O foco é otimizar o cálculo de Pi, reduzindo a latência em chamadas repetidas para obter o valor mais rapidamente.\n\n## Tecnologias Utilizadas\n\n- **Java 17**\n- **Spring Boot**\n- **Gradle ou Maven** (dependendo da sua preferência para gerenciamento de dependências)\n\n## Como Funciona\n\n- O service PiService calcula do valor de Pi e salva o valor encontrado após a entrega da Request.\n- Com a anotação `@Cacheable`, os dígitos decimais de Pi são armazenadas em cache após a primeira chamada, permitindo que chamadas subsequentes sejam atendidas rapidamente sem a latência inicial.\n- A classe `CacheApplication` habilita o caching por meio da anotação `@EnableCaching`.\n\n_[Caching documentation](https://docs.spring.io/spring-boot/docs/2.1.6.RELEASE/reference/html/boot-features-caching.html)_\n\n_[Caffeine documentation](https://github.com/ben-manes/caffeine)_\n\n### Curiosidades\n\n- Métodos anotados com @Scheduled são ignorados em chamadas dentro da própria classe (self-invocation). Para mais detalhes, veja a documentação sobre _[Taredas Agendadas](https://www.baeldung.com/spring-scheduled-tasks)_\n- Para possibilitar o \"pré-processamento\" dos dados com o valor de precision = 1500, foi necessário criar o CachedPiService, garantindo que o caching seja aplicado corretamente.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasdiasjorge%2Fspring-cache-implementation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucasdiasjorge%2Fspring-cache-implementation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasdiasjorge%2Fspring-cache-implementation/lists"}