-
Notifications
You must be signed in to change notification settings - Fork 80
Open
Description
SEPARAR INTERFACES
public interface InvoiceRepository { Invoice findById(int id); List<Invoice> list(); boolean create(Invoice invoice); boolean update(Invoice invoice); boolean delete(Invoice invoice);
La cache podría ir en una clase decoradora o wrapper:
public class CachedInvoiceRepository implements InvoiceRepository { private final InvoiceRepository delegate; private final Map<Integer, Invoice> cache = new HashMap<>(); // métodos que usan cache y llaman al delegate }
Metadata
Metadata
Assignees
Labels
No labels