我有学生,我想保存在数据库和Redis缓存中,以提高性能。 我有学生POJO: @NoArgsConstructor
@AllArgsConstructor
@Builder
@Data
@RedisHash("Student")
public class Student implements Serializable, RedisElement {
private static final long serialVersionUID = 4555735174035964832L;
public enum Gender {
MALE, FEM
docs ()显示如下代码:
const { RedisCache } = require('apollo-server-cache-redis');
const server = new ApolloServer({
typeDefs,
resolvers,
cache: new RedisCache({
host: 'redis-server',
// Options are passed through to the Redis client
}),
dataSources: () => ({
movie