dets ram_file模式和 dets + ets的选择

从mod_security_server.erl 中摘抄的:

%%
%% The storage model is a write-through model with both an ets and a dets
%% table. Writes are done to both the ets and then the dets table, but reads
%% are only done from the ets table.
%%
%% This approach also enables parallelism when using dets by returning the
%% same dets table identifier when opening several files with the same
%% physical location.
%%
%% NOTE: This could be implemented using a single dets table, as it is
%%       possible to open a dets file with the ram_file flag, but this
%%       would require periodical sync's to disk, and it would be hard
%%       to decide when such an operation should occur.
%%

这个选择比较有趣!

你可能感兴趣的:(Security)