哪些缓存使用 Alfresco 以及如何正确清理它们?

What caches uses Alfresco and how to properly clean them?

在对业务流程进行多次试验后,我注意到业务流程的旧定义某处被缓存了。

比如我开发了一些业务流程,然后用它安装了AMP文件。我使用它,然后决定进行一些更改。

为此,我再次组装了AMP文件并安装了它:

[bykovan@docflow alfresco-community]$ sudo java -jar bin/alfresco-mmt.jar uninstall some-module-repo tomcat/webapps/alfresco.war
...
[bykovan@docflow alfresco-community]$ sudo java -jar bin/alfresco-mmt.jar install amps/some-module-repo-1.0-SNAPSHOT.amp tomcat/webapps/alfresco.war
...

但是我在部署后没有看到我的更改!为了使更改生效,我必须做很多额外的工作。

Sequence of actions:

1 关机 Tomcat

[bykovan@docflow alfresco-community]$ sudo ./alfresco.sh stop

2 重新创建 alfresco 数据库

[bykovan@docflow alfresco-community]$ sudo -i -u postgres
[postgres@docflow ~]$ psql
psql (9.5.5)
postgres=#
postgres=# drop database alfresco;
...
postgres=# create database alfresco;
...
postgres=# alter database alfresco owner to alfresco;
...
postgres=# \q
[postgres@docflow ~]$ exit

3 从 alf_data

中删除所有内容
[bykovan@docflow alf_data]$ sudo rm -r *

4 删除 alfrescoshare 文件夹

[bykovan@docflow alfresco-community]$ sudo rm -r alfresco
[bykovan@docflow alfresco-community]$ sudo rm -r share

5 开始 Tomcat

[bykovan@docflow alfresco-community]$ sudo ./alfresco.sh start

6 等待数据库初始化...

7 设置管理员密码

SELECT 
    anp1.node_id, // paste to the update statement
    anp1.qname_id, // paste to the update statement
    anp1.string_value 
FROM alf_node_properties anp1 
    INNER JOIN alf_qname aq1 ON aq1.id = anp1.qname_id 
    INNER JOIN alf_node_properties anp2 ON anp2.node_id = anp1.node_id 
    INNER JOIN alf_qname aq2 ON aq2.id = anp2.qname_id 

WHERE aq1.local_name = 'password'  
    AND aq2.local_name  = 'username' 
    AND anp2.string_value = 'admin';


UPDATE 
    alf_node_properties 
SET 
    string_value='209c6174da490caeb422f3fa5a7ae634' 
WHERE node_id=... and qname_id=...;

(其中 '209c6174da490caeb422f3fa5a7ae634' 是 NTLM 编码的字符串 'admin'

8 重启Tomcat

9 以 Admin 身份登录,密码 admin,添加用户等...

哪些缓存使用 Alfresco 以及如何正确清理它们?

我使用以下配置:

Alfresco Share v5.2.d (r134641-b15, Aikau 1.0.101.3, Spring Surf 5.2.d, Spring WebScripts 6.13, Freemarker 2.3.20-alfresco-patched, Rhino 1.7R4-alfresco-patched, Yui 2.9.0-alfresco-20141223)

Alfresco Community v5.2.0 (r134428-b13) schema 10005

您可以在此位置找到临时文件

<<alfresco-community>>\tomcat\temp

文件存储在alf_data

<<alfresco-community>>\alf_data

Axel Faust给出了详尽的答案:

What caches uses Alfresco and how to properly clean them?

"Any caches that Alfresco uses are emptied / cleared when Alfresco is restarted... Generally you should NEVER have to work with the database directly. It is strongly discouraged and not supported by Alfresco in any way."

它解决了我的问题。