Ruby面试系列四,新鲜刚出炉的面试题
发布日期:2021-09-29 20:09:09
浏览次数:4
分类:技术文章
本文共 1087 字,大约阅读时间需要 3 分钟。
这次是留的家庭作业 [quote] Write a model (ActiveRecord-based, or similar pattern) for storing configuration settings. Each setting should have a unique identifier such as a name, and should hold a single value. For example: an email address used to send error emails, or a boolean flag to enable/disable a particular feature. It must be possible to store values of at least these 4 types: string, integer, float and boolean. The purpose of this exercise is to show your code design skills. Therefore, the model's interface for reading and writing configuration values must be simple and convenient. It should be possible to read and write specific values, versus reading and writing all the configuration settings all at once. The model should come with unit tests and database migrations, or whatever is required given your persistent storage setup. Bonus: add caching so that values don't need to be read from the database every time they are accessed. If using Ruby on Rails, consider using standard Rails caching techniques for this. HTML caching should not be required. [/quote] 这个个加分的缓存是说啥呢转载地址:https://blog.csdn.net/horace_lee/article/details/84046642 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
哈哈,博客排版真的漂亮呢~
[***.90.31.176]2024年03月30日 03时22分57秒
关于作者
喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
数据库视频—总结
2019-04-26
简单工厂模式和策略模式的比较
2019-04-26
简单工厂、工厂方法、抽象工厂模式
2019-04-26
单例模式
2019-04-26
组合模式
2019-04-26
三层架构
2019-04-26
委托与事件(浅度分析)—委托
2019-04-26
委托与事件(浅度分析)—事件
2019-04-26
.NET框架
2019-04-26
VB.NET入门
2019-04-26
七层登录
2019-04-26
Polar bear and air-conditioner
2019-04-26
不加注解引起的500错误
2019-04-26
PB使用专用接口连接SQL Server
2019-04-26
PB中创建需要带参数查询的DataWindow
2019-04-26
idea如何设置自动换行
2019-04-26
Java—JDBC入门
2019-04-26
java各工具类Utils
2019-04-26
java8 集合分组(根据集合中对象中时间字段的月份分组)
2019-04-26
Linux常用快捷键和基本命令
2019-04-26